(commit: StreamCommit)
| 64 | } |
| 65 | |
| 66 | function traceCommit(commit: StreamCommit) { |
| 67 | return { |
| 68 | ...commit, |
| 69 | text: summarize(commit.text), |
| 70 | textLength: commit.text.length, |
| 71 | part: commit.part |
| 72 | ? { |
| 73 | id: commit.part.id, |
| 74 | sessionID: commit.part.sessionID, |
| 75 | messageID: commit.part.messageID, |
| 76 | callID: commit.part.callID, |
| 77 | tool: commit.part.tool, |
| 78 | state: { |
| 79 | status: commit.part.state.status, |
| 80 | title: "title" in commit.part.state ? summarize(commit.part.state.title) : undefined, |
| 81 | error: "error" in commit.part.state ? summarize(commit.part.state.error) : undefined, |
| 82 | time: "time" in commit.part.state ? summarize(commit.part.state.time) : undefined, |
| 83 | input: summarize(commit.part.state.input), |
| 84 | metadata: "metadata" in commit.part.state ? summarize(commit.part.state.metadata) : undefined, |
| 85 | }, |
| 86 | } |
| 87 | : undefined, |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | export function traceSubagentState(state: FooterSubagentState) { |
| 92 | return { |
nothing calls this directly
no test coverage detected