picoclaw/web/frontend/src
xiaoen 8034ee7be1 fix(agent): correct media token arithmetic and tool call double-counting
Two estimation bugs fixed:

1. Media tokens were added to the chars accumulator before the chars*2/5
   conversion, resulting in 256*2/5=102 tokens per item instead of 256.
   Fix: add media tokens directly to the final token count, bypassing
   the character-based heuristic.

2. estimateMessageTokens counted both tc.Name and tc.Function.Name for
   tool calls, but providers only send one (OpenAI-compat uses
   function.name, Anthropic uses tc.Name). Fix: count tc.Function.Name
   when Function is present, fall back to tc.Name only otherwise.

Also fix i18n hint text: "auto-detect" was misleading — the backend
uses a 4x max_tokens heuristic, not actual model detection.
2026-03-16 14:48:34 +08:00
..
api refactor(web): split gateway logs out of the status endpoint (#1504) 2026-03-13 17:58:20 +08:00
components feat(config): expose context_window in example config and web UI 2026-03-16 14:48:33 +08:00
hooks feat(web): use a global WebSocket for Pico chat sessions (#1507) 2026-03-13 19:04:18 +08:00
i18n fix(agent): correct media token arithmetic and tool call double-counting 2026-03-16 14:48:34 +08:00
lib feat(web): use a global WebSocket for Pico chat sessions (#1507) 2026-03-13 19:04:18 +08:00
routes feat(web): use a global WebSocket for Pico chat sessions (#1507) 2026-03-13 19:04:18 +08:00
store feat(web): use a global WebSocket for Pico chat sessions (#1507) 2026-03-13 19:04:18 +08:00
index.css feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
main.tsx feat(web): migrate launcher to modular web frontend/backend and improve management UX (#1275) 2026-03-09 19:42:03 +08:00
routeTree.gen.ts feat(web): add agent management UI and improve launcher integration (#1358) 2026-03-11 18:37:00 +08:00