Commit Graph
134 Commits
Author SHA1 Message Date
Liang Jiaqing 33f486d08b Add codex metadata for responses requests 2026-06-16 21:16:30 +08:00
Liang Jiaqing de501f785b Fix truncation warning placement and untrack skill_search 2026-06-12 14:33:03 +08:00
Liang Jiaqing 2cb4ad0d8d fix responses codex client metadata 2026-06-11 21:58:58 +08:00
Liang Jiaqing 87c4f63340 Update Codex native user agent 2026-06-11 11:05:32 +08:00
Liang Jiaqing 920f7e3f2b llmcore: fix empty-response not triggering mixin failover; distinct default UA for NativeOAISession 2026-06-10 20:25:51 +08:00
Liang Jiaqing c883c02907 fix: chat bottom padding 7->10rem; disable forced max_tokens=64000 in NativeClaudeSession 2026-06-09 22:00:50 +08:00
Liang Jiaqing da398d91ee fix(llm): stream read_timeout 30s->40s, avoid reasoning-model long-thinking false timeout
fix(frontend): force chat_input pinned to bottom (iframe wrapper fallback); drop details scroll-fix JS
2026-06-09 22:00:50 +08:00
Jiaqing Liang 0107f6c6ce Update LLM user agent handling and incubator notes 2026-06-08 15:05:47 +08:00
Jiaqing Liang db979aafc8 feat: force non-stream mode for reflect/task, fix BaseSession.ask() return type, broadcast stream/read_timeout in MixinSession 2026-05-28 16:15:41 +08:00
Liang Jiaqing 01f46b75bb refactor: fix_messages rewrite, Click check, ui_detect batch OCR 2026-05-27 16:49:07 +08:00
Liang Jiaqing 30e331a224 fix(llmcore): robust _fix_messages — defensive .get, dedup tool_results, clean orphan results from first user msg 2026-05-27 13:46:29 +08:00
Liang Jiaqing 9d03baf0e0 llmcore: bump claude-cli UA to 2.1.152, add context-mgmt/effort betas, Stainless headers, refine fake_cc system injection 2026-05-27 13:32:43 +08:00
Shen Hao 874c5ea234 fix(llmcore): add Cloudflare 520-527 to _stream_with_retry _RETRYABLE set 2026-05-26 23:28:01 +08:00
Jiaqing Liang ab0919cfa7 fix mykey path, add inject-prompt button, harden reload_mykeys 2026-05-25 13:29:12 +08:00
Jiaqing Liang 6b7ebaaecd chore: remove redundant langfuse_tracing load from llmcore (handled by discover_and_load) 2026-05-21 18:22:47 +08:00
Jiaqing Liang 795d2d51a2 fix: ensure mykey.py is always importable from llmcore
- Add sys.path.append for llmcore's own directory as fallback
- Remove dead variable _imp_err
- Distinguish missing mykey vs import failure with clear error messages
2026-05-21 18:17:53 +08:00
cv70 e0e7487409 feat: add agent lifecycle hook trigger mechanism 2026-05-21 14:33:56 +08:00
Shen HaoandShen Hao 3b67919561 feat(tui v2): plan card + done annotation + /cost + /review wiring (#411)
- Plan card (📋): per-session message-scan with `plan_scan_baseline` so
  `/continue` of a finished session doesn't auto-resurrect old plan cards;
  prefers `<summary>当前步骤:` over the long plan-item echo; placeholder
  while enter_plan_mode is armed but plan.md hasn't been written yet.
- Done annotation (⠿ {Verb} for Xm Ys · ↑ N · ↓ M): post-turn elapsed
  + per-call token deltas, frozen at done so the line stays put across
  re-mounts. Spinner annotation gated on cumulative deltas past stream-start
  baselines — fixes `↓ 16` showing immediately on prompt submit.
- fold_turns regex anchored to line-start (`^` + MULTILINE) so embedded
  backticks in tool output (e.g. `N|\`\`\`\`` gutter from file_read) don't
  pair with later real fences. ~100x faster on long /continue sessions.
- /cost: per-session card + `/cost all`; `Context window` line now reads
  GA's actual char cap via `cost_tracker.context_window_chars(backend)` =
  `backend.context_win * 3` (the `trim_messages_history` trigger threshold
  in llmcore.py), so the percentage reflects real budget and respects
  `mykey.py` overrides. Unit changes from token to character. Dropped the
  model-theoretical `_CTX_LIMITS` table (never actually constrained anything).
  Subagent log scan via `cost_tracker.scan_subagent_logs` aggregates
  `temp/*/stdout.log` since TUI start.
- /review: standalone in-session reviewer; reuses `review_cmd.handle`
  to render the inline prompt and submits as a normal user task.
- llmcore: emit `[Output] tokens=N` for chat_completions / responses modes
  (already emitted for `messages` SSE) so cost_tracker scopes output
  tokens uniformly across all three API modes.
- review_inline_prompt.{txt,en.txt}: filled out the in-session review
  discipline — Three Iron Rules, Q1-Q4 framing, severity examples,
  8 false-positive rules expanded, 8 wording rules expanded, 8-item
  self-check. ZH/EN both grow ~80 lines.
- memory/review_sop.md: rewrite 52 → 191 lines, 11 sections covering
  quick-start, entry files, Three Iron Rules, 5-step workflow, severity,
  output protocol, relationship to plan_sop / verify_sop. Style mirrors
  plan_sop.md + autonomous_operation_sop.md.

Files: frontends/{tuiapp_v2,tuiapp,cost_tracker,plan_state}.py, llmcore.py,
memory/review_sop.md, memory/review_sop/review_inline_prompt.{txt,en.txt},
.gitignore (allowlist new SOP).

Co-authored-by: Shen Hao <shenhao-stu@users.noreply.github.com>
2026-05-18 08:20:52 +08:00
d 🔹andd 🔹 1f83fd11ea fix(llmcore): MixinSession.model tracks current session, not first (closes #394) (#401)
`self.model` was pinned to `_sessions[0].model` at init; after failover the
topbar (and any other reader of `agent.get_llm_name(model=True)`) kept showing
the primary's model name even when `_cur_idx` had moved to a fallback session.

Convert to a property returning the current session's model. `_BROADCAST_ATTRS`
doesn't include `model`, and grep finds no external writes, so making it
read-only is safe.

Co-authored-by: d 🔹 <258577966+voidborne-d@users.noreply.github.com>
2026-05-17 21:26:29 +08:00
Liang Jiaqing eecb8ee35a refactor: parameterize compress/trim intervals, add stop/kill subagent actions, remove web/pet CLI commands 2026-05-15 12:18:33 +08:00
Liang Jiaqing 438e8fc4dd conductor: cleanup style, filter aborted agents, add auto-cleanup thread; llmcore: conditional _drop_unsigned_thinking for non-claude models; task_planning: minor edit 2026-05-14 22:55:50 +08:00
Liang Jiaqing a9c6ab42c7 feat: add conductor system, code_review_principles; update llmcore, supervisor_sop, goal_mode constraints, gitignore whitelist 2026-05-13 23:02:52 +08:00
Jiaqing Liang e4c39b16d3 feat: tighten context budget - maxlen 15k, trim refactor with staged compress 2026-05-13 23:02:52 +08:00
Liang Jiaqing b6617afb2e fix: prevent empty response from corrupting history & add _fix_messages to non-native paths 2026-05-09 17:28:11 +08:00
Liang Jiaqing 14f50a2a59 fix: avoid empty content messages in native tool flow 2026-05-09 16:28:44 +08:00
wangjc683 1416f70efb fix: filter whitespace-only text blocks in NativeToolClient.chat() (#307)
When the model only outputs tool calls with no meaningful text,
combined_content may contain only whitespace text blocks (e.g. '\n').
Strict API proxies reject this with HTTP 400 'empty content' error.
Filter out such blocks before sending to the API.
2026-05-09 10:41:29 +08:00
Liang Jiaqing e5265a03dc tuiapp: cache rendered panels; llmcore: simplify fast_ask 2026-05-07 22:18:25 +08:00
Liang Jiaqing 0a2be47c00 refactor: simplify LLM client init with resolve_client; add fast_ask; auto-fold old tasks in TUI 2026-05-07 21:06:14 +08:00
Liang Jiaqing 6fd7e2d7a0 feat: add Textual TUI frontend + minor fixes to agentmain/llmcore/stapp 2026-05-07 17:38:58 +08:00
Liang Jiaqing 5aaa26e69b file_write: support content arg in native mode, strip it in text-emulated mode 2026-05-06 10:30:08 +08:00
Liang Jiaqing 26d5fc6781 feat: auto-inject summary text block when model outputs thinking+tool_use without text; stapp fallback uses content preview 2026-05-03 12:22:05 +08:00
Liang Jiaqing 52a53e44c0 fix: clear _pending_tool_ids when history is empty to prevent orphan tool_result after /new 2026-05-02 21:05:51 +08:00
Liang Jiaqing 60b1112960 fix: include earlier_context in compress_history_tags pattern 2026-05-02 20:46:16 +08:00
Liang Jiaqing a405a02238 add official channel disclaimer; fix scroll/wechat-md/llm-msg 2026-05-01 08:41:10 +08:00
Liang Jiaqing 3da34d2f58 cleanup: remove NextWillSummary, add supervisor_sop, fix streaming fence protection, tighten L1 rules 2026-04-29 13:29:03 +08:00
Liang Jiaqing 0f2d1d3165 refactor: deduplicate _parse_mixed_response by reusing _parse_text_tool_calls; fix orphan tool_result in _fix_messages 2026-04-28 22:15:07 +08:00
Liang Jiaqing 4e41b15972 统一流重试行为: 不管mixin/非mixin中途断连都重试; 更新ga.py错误检测条件 2026-04-28 20:41:14 +08:00
Liang Jiaqing 2e4775f98a refactor: extract _stream_with_retry, MixinSession failover on stream abort 2026-04-28 17:54:37 +08:00
Liang Jiaqing 340d663b77 feat: add SSL verify option and enable TG draft 2026-04-27 18:15:57 +08:00
Jiaqing Liang eb3fa0041f feat: ensure thinking blocks for deepseek models in history 2026-04-27 15:11:09 +08:00
Jiaqing Liang 624058d25c refactor: _openai_stream takes sess+messages; add service_tier support 2026-04-27 15:11:08 +08:00
Liang Jiaqing e07c1b046b hotreload mykeys, fix SSE residual block, unify context_win, cleanup 2026-04-26 17:46:24 +08:00
Liang Jiaqing ea757b4ea3 fix: summary提取与fold_turns防误切,强化thinking模型summary输出 2026-04-26 00:01:42 +08:00
Liang Jiaqing f1537de52b tg: support document upload, disable draft streaming; wx: streaming flush during task; llmcore: safeprint, max_tokens fixes 2026-04-25 21:33:38 +08:00
Jiaqing Liang 1686312f93 Remove responses max output token limit 2026-04-25 14:03:21 +08:00
Jiaqing Liang 5c9a60c1d1 fix: _drop_unsigned_thinking对str content崩溃 + _to_responses_input丢弃thinking-only assistant消息导致tool_call被吞 2026-04-25 13:53:08 +08:00
Liang Jiaqing 53e2f0a4d5 fix: use correct token limit params for OpenAI APIs 2026-04-25 10:54:44 +08:00
Liang Jiaqing 492d55788a feat: reasoning/thinking互通适配 + history窗口扩大 + summary提示强化 2026-04-25 10:33:42 +08:00
Liang Jiaqing 7ac7538181 add uv install guide & pyproject.toml; unify error prefix to !!!Error: 2026-04-24 10:00:23 +08:00
Liang Jiaqing ef82265f4a fix: SSE tool_call streaming compat for non-standard index/id, MockToolCall handle list args & None fallback; sop: CDP bringToFront note 2026-04-23 23:44:50 +08:00