teapot-coding-agent 0.37.69 → 0.37.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent/llm.js +15 -1
- package/dist/agent/tools.js +2 -1
- package/package.json +1 -1
- package/public/assets/{index-BlOQv88N.js → index-ChytaBSg.js} +4 -4
- package/public/assets/{index-BlOQv88N.js.map → index-ChytaBSg.js.map} +1 -1
- package/public/assets/{shiki-frNMxtMU.js → shiki-MyN5tF2P.js} +2 -2
- package/public/assets/{shiki-frNMxtMU.js.map → shiki-MyN5tF2P.js.map} +1 -1
- package/public/index.html +1 -1
package/dist/agent/llm.js
CHANGED
|
@@ -194,7 +194,21 @@ function sanitize(messages) {
|
|
|
194
194
|
const parts = m.content_parts.map((p) => p.type === "image_url"
|
|
195
195
|
? { type: "image_url", image_url: { url: p.image_url.url } }
|
|
196
196
|
: { type: "text", text: p.text ?? "" });
|
|
197
|
-
|
|
197
|
+
/**
|
|
198
|
+
* EVERY other field has to survive, not just `content`.
|
|
199
|
+
*
|
|
200
|
+
* This returned `{ role, content }` alone, so a TOOL message carrying an image lost its
|
|
201
|
+
* `tool_call_id` — and the API rejected the whole request: `400 Invalid input: expected string,
|
|
202
|
+
* received undefined`. MEASURED on v0.37.69 (`github-bug-research-1f48715f`): the `read_file`
|
|
203
|
+
* result rendered with its "the image itself is attached" text and the very next call 400'd.
|
|
204
|
+
*
|
|
205
|
+
* Spreading `m` first is what makes the multimodal path identical to the text path; a tool
|
|
206
|
+
* message without its id is not a message at all.
|
|
207
|
+
*/
|
|
208
|
+
// `content_parts` is OUR field, carrying the parts into `content`; sending it upstream is an
|
|
209
|
+
// unknown property (a strict server rejects the request), so it is dropped here.
|
|
210
|
+
const { content_parts: _parts, ...rest } = m;
|
|
211
|
+
return { ...rest, content: parts };
|
|
198
212
|
}
|
|
199
213
|
if ((m.role === "user" || m.role === "assistant") && !m.content) {
|
|
200
214
|
return { ...m, content: m.tool_calls?.length ? "(tool call)" : "(no content)" };
|
package/dist/agent/tools.js
CHANGED
|
@@ -989,7 +989,8 @@ export function lineIdMode(args) {
|
|
|
989
989
|
export const TOOLS = [
|
|
990
990
|
{
|
|
991
991
|
name: "read_file",
|
|
992
|
-
description: "Read a
|
|
992
|
+
description: "Read a file from the workspace. Returns numbered lines (`N| ` prefixes are display-only — never copy them into edit_file). " +
|
|
993
|
+
"On an IMAGE (png/jpeg/gif/webp) the picture itself is attached to the result, so you can see it — do not decode bytes. " +
|
|
993
994
|
"With `line_ids:\"hash\"` it instead returns `LINE:HASH| content` anchors (the hashline format used by other coding harnesses), " +
|
|
994
995
|
"which edit_file accepts VERBATIM and re-verifies against the file — so prefer it when you intend to edit what you just read. " +
|
|
995
996
|
"Pass `paths` (max 10) to read SEVERAL files in one call instead of one call per file; " +
|