470 Commits

Author SHA1 Message Date
Liang Jiaqing
08c583d1c6 fix: filter empty text blocks in message conversion & add prompt continuation line 2026-04-22 19:37:06 +08:00
LJQ
928633e4b2 Merge pull request #134 from shenhao-stu/main
template: upload mykey_template_en.py
2026-04-22 19:11:43 +08:00
Shen Hao
542aa89130 template: add mykey_template_en.py 2026-04-22 19:09:07 +08:00
Shen Hao
eb2a3bf824 template: add Kimi for Coding configuration 2026-04-22 19:05:40 +08:00
Liang Jiaqing
274d47f35f Normalize OAI messages before conversion and update tool-call prompt 2026-04-22 17:16:05 +08:00
weijia
b34cffe801 feat(fsapp): render agent run as one continuously-updating Feishu card (#131)
Rework the Feishu frontend so each user turn renders as a single
collapsible task card that patches itself in place, replacing the
dq-based streaming path that produced many fragmented messages.

- One _TaskCard per turn; hook reacts to summary / exit_reason events
  from the agent loop and patches the same card.
- Each step is a foldable panel: header shows the summary, expanding
  reveals three sections (auto-hidden when empty):
    * Thinking   - from response.thinking (separate field, not content)
    * Tool Calls - tool name + truncated JSON args
    * Output     - response.content, with protocol tags stripped so
                   the header summary is not duplicated inside
- Final reply rendered as a schema 2.0 markdown card for consistency.
- Code-review pass per code_review_principles.md:
    * _TaskCard owns only stateful card lifecycle (start/step/done/fail)
    * Pure formatting extracted to module-level _build_step_detail and
      _fmt_tool_call (no more reaching into card._private from the hook)
    * Hook is a ~10-line dispatcher
    * Flattened a 4-level nested lambda into a named function
2026-04-22 14:12:51 +08:00
Liang Jiaqing
132edb3154 improve GPT done_hook: require informative summary on completion 2026-04-22 10:53:29 +08:00
Liang Jiaqing
7b2ff1e73a feat(tgapp): handle photo messages, pass temp path to agent 2026-04-21 23:39:46 +08:00
LJQ
f1db2e56df feat: add Telegram slash command parity and menu sync (#125)
feat: add Telegram slash command parity and menu sync
2026-04-21 23:14:38 +08:00
song
f14ad0c693 fix(llmcore): preserve thinking block signature in streaming SSE parser (#123)
Anthropic's extended thinking streaming protocol emits two delta types
for a single thinking block: `thinking_delta` (the textual reasoning)
and `signature_delta` (a base64 HMAC tag appended at the end of the
block). Both must be accumulated into the same `content_block`.

Current code only handles `thinking_delta`, so `signature_delta` events
are silently dropped. When the assistant's reply (with thinking) is
echoed back on the next turn, Anthropic's server validates the
signature and rejects the request with 400:

    "Invalid `signature` in `thinking` block"

Downstream effects observed in production (via sub2api relay logs):
- Every request with history triggers a 400 signature error
- The relay strips thinking blocks and retries, which changes the
  cache prefix and invalidates prompt caching, forcing a full rebuild
  of cache_creation_tokens (~20k-30k per affected request)
- Measured in a 5h window: 5/25 requests suffered cache invalidation,
  accounting for 53.5% of total spend that was otherwise avoidable

Fix:
1. Initialize `current_block` with an empty `signature` field when a
   thinking block starts, so the dict shape matches Anthropic's spec
   (`{type, thinking, signature}`).
2. Handle `signature_delta` events by appending `delta.signature` to
   `current_block["signature"]`. Using `+=` (rather than assignment)
   mirrors how `thinking_delta` is accumulated and is robust against
   future chunked signatures.

No behavior change for clients that disable extended thinking, or for
upstreams that don't emit `signature_delta`. For `tool_use` threads
that require valid thinking signatures to preserve reasoning context,
this fix is required — the previous behavior silently corrupted them.

Verification:
- Before fix: upstream returns 400 + retry; cache_creation_tokens
  spike to ~25k on every 4th-5th request in a conversation
- After fix: upstream accepts the first attempt; cache_read_tokens
  dominate, cache_creation_tokens only appear on the first request
  of a fresh 5m prompt-cache window
2026-04-21 12:07:14 +08:00
LJQ
7ce39e29d0 Merge pull request #124 from ViviqwerAsd/docs/update-wechat-qr-codes-v2
docs: update WeChat community group QR codes
2026-04-21 11:52:37 +08:00
Xinyi Wang
09a78573f5 docs: update WeChat community group QR codes
- Replace 3 old QR codes (group 5/6/7) with 4 new ones (group 6/8/9/10)
- Update both English and Chinese sections in README.md
- Remove obsolete wechat_group5.jpg and wechat_group7.jpg
- Add wechat_group8.jpg, wechat_group9.jpg, wechat_group10.jpg
2026-04-21 11:47:55 +08:00
YooooEX
ef9d218f91 feat: add Telegram slash command parity and menu sync 2026-04-21 11:43:53 +08:00
Liang Jiaqing
055fe882fc docs: add arXiv link (2604.17091) to README 2026-04-21 10:57:51 +08:00
Liang Jiaqing
d25cfa5a2a refactor: vision_sop精简改写 + 新增vision_api.template.py 2026-04-20 23:22:36 +08:00
Liang Jiaqing
5c1dd1270c refactor stapp rerun reset logic and simplify vision SOP 2026-04-20 21:10:49 +08:00
LJQ
bf4bc5d2ea feat: add /continue and /new command support to all chat frontends (#120)
feat: add /continue and /new command support to all chat frontends
2026-04-20 21:01:09 +08:00
Xinyi Wang
d1a491ff3b feat: add continue/new support to chat frontends 2026-04-20 19:27:31 +08:00
Jiaqing Liang
db3a807141 docs: add link to Datawhale hello-generic-agent tutorial 2026-04-20 16:26:07 +08:00
Jiaqing Liang
116d7d3d23 refactor: plugins dir + opt-in langfuse via __getattr__ guard
- mv langfuse_tracing.py -> plugins/langfuse_tracing.py
- llmcore: load plugin lazily inside __getattr__ when langfuse_config present
  (PEP 562 module __getattr__ naturally fires only once after globals().update)
- llmcore: extract _record_usage() from 4 scattered [Cache] print sites
- agentmain: /resume scans only latest 10 files
2026-04-20 15:56:06 +08:00
totoyang
8e6270e3a3 feat: optional Langfuse tracing for agent execution (#115)
Self-activating langfuse tracing via monkey-patch: independent module, zero impact when langfuse_config unset. Captures LLM generation, tool calls, token usage from SSE streams.

Co-authored-by: totoyang
2026-04-20 15:27:55 +08:00
Jiaqing Liang
adc702d3f8 docs: add GitHub badge linking to GA-Technical-Report (data & reproduction repo) 2026-04-20 12:37:17 +08:00
Jiaqing Liang
765fcb6c2e docs: move disclaimer to License section (less intrusive) 2026-04-20 12:19:29 +08:00
Jiaqing Liang
ae796482e8 docs: add disclaimer about unofficial commercial sites 2026-04-20 12:17:28 +08:00
Liang Jiaqing
63c7c83c51 refactor: update agent loop and tool extraction 2026-04-19 23:21:37 +08:00
Liang Jiaqing
86ca4625ad refactor: simplify HTTP error handling in _openai_stream, add non-stream support, broadcast history in MixinSession 2026-04-19 20:57:07 +08:00
LJQ
d1f4ee9aaf Merge pull request #112 from shenhao-stu/main
feat: add /continue cmd
2026-04-19 19:15:41 +08:00
Shen Hao
8d07a0b4eb feat: Import chatapp_common for command activation
Added import for chatapp_common to enable command functionality.
2026-04-19 19:12:36 +08:00
Shen Hao
faf5c9ce01 feat: Add imports for GeneraticAgent and continue command
Import GeneraticAgent and install continue command.
2026-04-19 19:11:39 +08:00
Shen Hao
9d5e4b18eb feat: update continue_cmd.py 2026-04-19 19:10:38 +08:00
Liang Jiaqing
2d753a6930 improve /resume: use regex to extract history blocks instead of naive tail reading 2026-04-19 17:15:38 +08:00
Liang Jiaqing
745220e62c Revert "Merge pull request #108 from ggandmee-cloud/feat/cch-signing"
This reverts commit 3e61155b33, reversing
changes made to 4abb8e205d.
2026-04-19 16:18:45 +08:00
LJQ
0214388d10 Merge pull request #110 from shenhao-stu/main
update mykey_template.py and add user_agent
2026-04-19 15:40:19 +08:00
Shen Hao
9217fee211 [feat]: Add user agent configuration to llmcore 2026-04-19 15:38:41 +08:00
Shen Hao
7c2785efe2 [config]: update mykey_template.py 2026-04-19 15:37:30 +08:00
LJQ
3e61155b33 Merge pull request #108 from ggandmee-cloud/feat/cch-signing
feat: NativeClaudeSession 在 fake_cc_system_prompt 模式下支持可选 CCH 签名
2026-04-19 15:27:13 +08:00
ggandmee-cloud
c79b1c5140 feat: NativeClaudeSession 加入 CCH 签名
匹配真实 Claude Code 客户端协议,兼容需要验证客户端身份的代理。
2026-04-19 01:20:01 -04:00
Liang Jiaqing
4abb8e205d sys_prompt_en: 去掉强制英文,跟随用户语言 2026-04-19 11:29:30 +08:00
Liang Jiaqing
c6319594c7 清理SOP: web_setup去TM方案, tmwebdriver排查流程优化 2026-04-19 11:16:29 +08:00
Liang Jiaqing
77d44c8cd0 update technical report 2026-04-19 10:03:32 +08:00
Liang Jiaqing
5d015d42c9 update technical report: language polish and table layout improvements 2026-04-18 19:58:56 +08:00
Liang Jiaqing
f8a380d4fd fix: increase default timeout for non-stream mode (10/240s vs 5/30s) 2026-04-18 16:45:37 +08:00
Liang Jiaqing
2632478d96 fix: get_llm_name case-insensitive match & refactor to accept optional backend param 2026-04-18 14:46:05 +08:00
Liang Jiaqing
c529abce3c fix: clarify start_long_term_update should only be called when task is completed (not mid-task) 2026-04-18 13:09:01 +08:00
Liang Jiaqing
11c41e7c4a refine memory_cleanup_sop: 4 compression principles, RULES triage, anti-intuitive trigger words, layered placement 2026-04-18 12:33:41 +08:00
Liang Jiaqing
3c2d22b948 refactor: move chat bubble asset to frontends/ and rename to English 2026-04-18 11:13:38 +08:00
Keeper
5d0d4b7d27 add: right-click of changing skin for desktop pet (#99)
* fix: skin icon size

* fix: skin icon size

* fix: skin icon size

* fix: skin icon size

* fix: skin icon size

* fix: skin icon size

* add: right click logic of changing skin
2026-04-18 11:00:56 +08:00
LJQ
184948b772 Merge pull request #89 from mmgnosit-commits/fix/minimax-timeout-retry
fix(llmcore): 添加MiniMax超时错误码529支持重试机制
2026-04-18 10:59:16 +08:00
weijia
f49d69cf92 fix: 桌宠气泡 (#102)
* refactor: 精简desktop_pet_v2 — 内联_find_bubble_asset、删debug log、去重复RGBA检查

- 内联 _find_bubble_asset() 到 build_bubble_image (减少一层函数调用)
- 删除2处 /tmp/pet_toast_debug.log 写入
- 去除 Mac load_skin 中重复的 RGBA 转换检查
- 所有气泡核心逻辑(ImageOps.contain/非对称padding/alpha crop/tail扫描/定位公式)完整保留
- 785行 → 763行 (-22行)

* fix: 修复气泡文字碰边框问题,基于不透明区域计算文字padding

* feat: 添加自定义聊天气泡图片

* style: shift bubble text up 3px for better visual centering
2026-04-18 10:48:30 +08:00
Liang Jiaqing
ec34b7e1c0 Add technical report link to README 2026-04-18 00:13:48 +08:00