Compare commits

...

7 Commits

Author SHA1 Message Date
Github Action
9017e063ca Update node_modules hash (x86_64-darwin) 2026-01-16 17:47:44 +00:00
Aiden Cline
d65f09b82a test: fix test 2026-01-16 11:46:17 -06:00
Github Action
5f52abf090 Update node_modules hash (aarch64-linux) 2026-01-16 17:43:00 +00:00
Aiden Cline
4d91552be3 Merge branch 'dev' into fix-ai-message-issue 2026-01-16 09:40:41 -08:00
Aiden Cline
5385995398 fix test 2026-01-16 10:52:58 -06:00
Aiden Cline
232e531091 Revert "stop select dialog event propagation"
This reverts commit 46be47d0be.
2026-01-16 09:30:52 -06:00
Aiden Cline
25f0a2b80b fix: AI_InvalidPromptError that occured due to previous commti from last night 2026-01-16 09:19:20 -06:00
4 changed files with 32 additions and 6 deletions

View File

@@ -1,8 +1,8 @@
{
"nodeModules": {
"x86_64-linux": "sha256-07XxcHLuToM4QfWVyaPLACxjPZ93ZM7gtpX2o08Lp18=",
"aarch64-linux": "sha256-E6lyYFApS1cw3jE7ISx5QZxDDJ9V3HU0ICYFdY+aIBw=",
"aarch64-linux": "sha256-0Im52dLeZ0ZtaPJr/U4m7+IRtOfziHNJI/Bu/V6cPho=",
"aarch64-darwin": "sha256-U2UvE70nM0OI0VhIku8qnX+ptPbA+Q/y1BGXbFMcyt4=",
"x86_64-darwin": "sha256-LxBsYdq5AzInQJzF89taXvS2vigew5C5hjaIEH8rTb8="
"x86_64-darwin": "sha256-grPR/YBqYPEUBks4nQKYe6/9f+9N0Fk9l2L9J6ylWkc="
}
}

View File

@@ -526,7 +526,11 @@ export namespace MessageV2 {
state: "output-available",
toolCallId: part.callID,
input: part.state.input,
output: part.state.time.compacted ? "[Old tool result content cleared]" : part.state.output,
// For compacted results, use plain string so SDK serializes as text type
// For normal results, pass object so toModelOutput can convert attachments to media parts
output: part.state.time.compacted
? "[Old tool result content cleared]"
: { output: part.state.output, attachments: part.state.attachments },
callProviderMetadata: part.metadata,
})
}

View File

@@ -716,7 +716,10 @@ export namespace SessionPrompt {
)
return result
},
toModelOutput(result) {
toModelOutput(result: string | { output: string; attachments?: MessageV2.FilePart[] }) {
// Handle compacted results (plain string)
if (typeof result === "string") return { type: "text", value: result }
if (!result.attachments?.length) return { type: "text", value: result.output }
return {
type: "text",
value: result.output,
@@ -806,7 +809,10 @@ export namespace SessionPrompt {
content: result.content, // directly return content to preserve ordering when outputting to model
}
}
item.toModelOutput = (result) => {
item.toModelOutput = (result: string | { output: string; attachments?: MessageV2.FilePart[] }) => {
// Handle compacted results (plain string)
if (typeof result === "string") return { type: "text", value: result }
if (!result.attachments?.length) return { type: "text", value: result.output }
return {
type: "text",
value: result.output,

View File

@@ -297,7 +297,23 @@ describe("session.message-v2.toModelMessage", () => {
type: "tool-result",
toolCallId: "call-1",
toolName: "bash",
output: { type: "text", value: "ok" },
output: {
type: "json",
value: {
attachments: [
{
id: "file-1",
sessionID: "session",
messageID: "m-assistant",
type: "file",
mime: "image/png",
filename: "attachment.png",
url: "https://example.com/attachment.png",
},
],
output: "ok",
},
},
providerOptions: { openai: { tool: "meta" } },
},
],