Commit Graph
6 Commits
Author SHA1 Message Date
yetone 82330dfa3f trae 0.2.2: a tool call Trae sends again whole, its punctuation not the partial one's, replaces the partial arguments instead of being appended to them (#24, Zhangwier)
Trae's llm_utils_chat streams a call's arguments as snapshots, and may send
the whole call again written apart from the partial one (U+2212 for -,
U+2032 for '), which neither extends it nor follows a whole one, so
NativeCalls joined the two and the call's arguments came out twice. A
whole JSON object under the same first key as the partial arguments, which
the two joined don't make whole, now replaces them. A piece that is a
JSON value of its own (12, "ls", {}) still joins the call: it doesn't
open with the call's first key. The new test of the resent snapshot fails
without the change; the one of pieces that are values of their own
passes either way. bun test (trae: 68) and bun scripts/check.mjs pass.
2026-10-05 22:01:28 +08:00
yetone 9d429b8663 trae 0.1.13: a <tool_call> with only DeepSeek's closing tags after it says nothing, and one wrapping DeepSeek's own invoke is the call (magpie#823 again, Dazzle-sys: Trae CN's DeepSeek V4.1 Flash in Pi showed <tool_call> </|DSML|parameter> </|DSML|invoke> </ as its reply) — the reply (17 tokens out) was our opener with no JSON in it, then DeepSeek's closes, cut short. A <tool_call> was read only for a JSON object, so with none it was held to the end and handed on as text, which the agent showed and the model read back. A <tool_call> whose content starts with a tag (or is empty at the end) now has its opener dropped and what follows read as it is: an invoke in it is a call, stray tags are dropped, and a tag cut short at the end (</) after them too. A block holding plain text stays as it was. The new test fails on 0.1.12; bun test (36 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 05:05:53 +08:00
yetone 20cd6f1bb2 trae 0.1.11: a tool call DeepSeek closes with its own tags, or writes as its own invoke, is a call, and its tags don't reach the agent (magpie#823, Dazzle-sys: Trae CN's DeepSeek V4.1 Flash in a group, in Pi, ended the session) — DeepSeek V4.1 Flash wrote <tool_call>{"name":"bash",…}</|DSML|parameter></|DSML|invoke, closing our block with its own tags rather than </tool_call>, or its own <|DSML|invoke name="…"> with <|DSML|parameter>s: neither was read, so the call went to the agent as text. A <tool_call> block is now taken once its JSON object is whole, whatever closes it; DSML invokes (full-width or plain bars, in function_calls or not, several in a row) are calls, a string="true" parameter its text and any other its JSON; the tags and blanks left around a call are dropped, a stray tag too. The new test fails on 0.1.10; bun test (34 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 03:23:58 +08:00
yetone 32aaeda5a6 trae 0.1.10: a tool call written as a tagged block with a file's content raw, or with its arguments beside the name, goes on whole, and an argument piece that names no call joins the one being written (magpie#799, mintonight: pi's write went out as {} and was refused, the turn ended mid-sentence; earlier <tool_call> blocks showed up as text) — a model writing a file through <tool_call>{"name":"write","arguments":{"content":"…"}}</tool_call> puts real newlines and tabs in the JSON string, which JSON.parse refuses: the block went to the agent as text, and a call parsed with nothing under arguments went as {}. Blocks are now read leniently (raw control characters inside strings taken as escaped), a block that gives its arguments beside the name has them taken, and a string of arguments is normalised. Native calls: a piece with neither id nor name (or an index its call's first event didn't give) joins the call still being written instead of being dropped, and arguments still not JSON at the end are read the same lenient way. Three tests fail on 0.1.9; bun test (33 pass) and bun scripts/check.mjs trae under a temp HOME pass. Not tried with a real Trae CN account (none here). 2026-10-05 02:11:07 +08:00
yetone b14b4d80c5 trae 0.1.8: a tool call Trae streams over several events goes on whole, not as its first event (magpie#799, mintonight: Trae CN models fail many tool calls — bash got echo "T, read got C:/Users/j, edit got {}) — Trae sends a native tool call in several output events under one id or index, each carrying the arguments so far or only the new piece; the plugin sent the first event of each id on and dropped the rest as repeats, so a call whose arguments came in more than one piece reached the agent cut short. NativeCalls now puts each call together across events (arguments that start with what came before replace it, a piece is appended, a repeat is ignored, a piece without a name joins its call by index) and sends the calls once the answer is whole. A test streaming one call cumulatively and one in pieces fails on 0.1.7; bun test (32 pass) and bun scripts/check.mjs trae pass. 2026-10-05 00:02:33 +08:00
yetone 6c048c7fc2 trae 0.1.0: Trae CN (trae.cn) accounts, free tier included, with Trae's browser sign-in (experimental; Discord pdzebkbd0701)
Sign-in is trae.cn's authorization page back to a 127.0.0.1 /authorize
callback (userJwt + userInfo, or a refresh token exchanged), with a device
made at sign-in and kept for the account. ExchangeToken renews the JWT
through auth.refresh (refreshLead 10 min, one renewal per refresh token).
Requests go to the IDE agent's llm_utils_chat (chat_v3, then
solo_work_lite on 4001/4023/1005), its SSE events turned into OpenAI
chunks; tools named natively and as <tool_call> blocks. Usage is the
entitlement packs' credits. Worked out from wangqi233/trae2api and
autumnsentiment/Trae2api-cn; not run against a real account.
2026-10-03 14:34:31 +08:00