63 Commits

Author SHA1 Message Date
pys306
365f4d31d2 feat(frontend): translate UI strings to Korean 2026-04-28 00:02:25 +09:00
Liang Jiaqing
cd0ce4d9b0 fix: summary提取与fold_turns防误切,强化thinking模型summary输出 2026-04-26 00:01:42 +08:00
LJQ
adf393c0a5 Merge pull request #173 from Stark-X/fix/linux-desktop-pet-pyside6
fix: add Linux desktop pet implementation
2026-04-25 22:09:35 +08:00
LJQ
12f23138e0 Merge pull request #164 from kukudelaomao/fix/wecomapp-event-handlers
fix(wecomapp): 修复WebSocket连接和事件处理器问题
2026-04-25 22:04:31 +08:00
LJQ
c19ac2dae6 Merge pull request #160 from YooooEX/telegram-polish
fix(tgapp): polish Telegram MarkdownV2 rendering and startup helpers
2026-04-25 21:59:49 +08:00
LJQ
5805566d88 Fix Telegram startup without a configured proxy
Fix Telegram startup without a configured proxy
2026-04-25 21:51:54 +08:00
Liang Jiaqing
5b0d96b1b5 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
Auston Li
bd2dd42ba4 Fix Telegram startup when proxy is not configured
Only use a proxy for tgapp when mykeys['proxy'] is explicitly configured, avoiding the dead default local proxy and restoring Telegram polling startup.

Closes #175
2026-04-25 00:54:42 -04:00
Stark-X
09cf6306af fix: add Linux desktop pet implementation 2026-04-25 10:58:38 +08:00
郭春飞
936501069c fix(wecomapp): 修复WebSocket连接和事件处理器问题
修复企业微信机器人无法正常连接的问题:

1. 修复WSClient初始化参数传递错误
   - 原代码错误地将参数传递给WSClient构造函数
   - 修正为正确传递host, port, path等参数

2. 修复连接方法调用错误
   - 将connect_async()改为connect()方法
   - AiBotSDK的WSClient使用同步connect方法

3. 修复事件处理器签名不匹配
   - on_connected/on_authenticated: 移除frame参数(这些处理器不需要参数)
   - on_disconnected: 添加reason参数
   - on_error: 添加error参数

修复后验证:
- WebSocket连接成功建立
- 认证过程正常完成
- 心跳机制正常工作
- 日志无错误信息

此修复解决了企业微信机器人启动后无法连接服务器的问题。
2026-04-25 01:18:28 +08:00
YooooEX
8e159a9773 feat(tgapp): add support for __ bold and ~~ strikethrough styles 2026-04-24 20:11:40 +08:00
YooooEX
0c5d3c8635 fix(tgapp): align startup with common helpers and render file marker basenames 2026-04-24 20:11:40 +08:00
Liang Jiaqing
114dfdb211 fix: wechatapp单例锁端口19528→19531 避免与qqapp/wecomapp冲突 2026-04-24 19:58:27 +08:00
Liang Jiaqing
ee899d4dd5 fix(tgapp): remove hardcoded proxy default, use mykey.py config instead
The proxy was hardcoded to http://127.0.0.1:2082 which breaks for users
without a local proxy (e.g. international users with direct access).
Now defaults to None; users who need a proxy can set it in mykey.py.
2026-04-24 17:30:48 +08:00
Xinyi Wang
a6644d580c feat(fsapp): add /llm command support for model switching
- Add /llm command to list available models
- Add /llm [n] command to switch to specific model
- Improve /status command to show current LLM info with emoji indicators
- Update /help text to include /llm command
- Unify command parsing logic using parts and op variables

This brings fsapp.py (Feishu/Lark) frontend in line with other chat frontends (QQ, DingTalk, WeCom) that already support all slash commands.
2026-04-24 04:20:16 -03:00
LJQ
6974853695 Merge PR #144: style: 重构并优化 qtapp 桌面窗口样式与交互功能
style: 重构并优化 qtapp 桌面窗口样式与交互功能
2026-04-24 09:26:08 +08:00
YooooEX
f516c52a72 feat(tgapp): stream MarkdownV2 replies with draft fallback and file segments (#135) 2026-04-24 09:01:49 +08:00
wellsoren
8065c0d759 style: 重构并优化 qtapp 桌面窗口样式与交互功能 2026-04-24 01:50:09 +08:00
weijia
fd4c833511 feat(stapp): restore chat history bubbles after /continue N (#138)
When the user runs '/continue N' in stapp, the agent's in-memory context
is restored, but the UI previously showed only a single ' restored' line
— all prior chat bubbles were missing.

This change parses the target session log and reconstructs the
user/assistant message pairs into st.session_state.messages, so reopening
a session feels like the conversation was never interrupted.

* continue_cmd.py: add extract_ui_messages(path)
  - parses model_responses log into [{role, content}, ...]
  - groups multi-turn LLM calls (prompts whose text starts with the
    '### [WORKING MEMORY]' header) into a single assistant bubble,
    inserting the existing '**LLM Running (Turn N) ...**' marker so
    fold_turns() renders them as collapsible segments.
  - two small helpers (_user_text / _assistant_text) keep parsing local.

* stapp.py: in the /continue branch, resolve the target log path BEFORE
  calling handle_frontend_command (which snapshots the current log and
  would otherwise shift list_sessions indices), then replace
  session_state.messages with the reconstructed history on success.
  Falls back to the previous behavior for bare /continue or failure.

Co-authored-by: wjl2023 <wjl2023@users.noreply.github.com>
2026-04-23 16:36:41 +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
7b2ff1e73a feat(tgapp): handle photo messages, pass temp path to agent 2026-04-21 23:39:46 +08:00
YooooEX
ef9d218f91 feat: add Telegram slash command parity and menu sync 2026-04-21 11:43:53 +08:00
Liang Jiaqing
5c1dd1270c refactor stapp rerun reset logic and simplify vision SOP 2026-04-20 21:10:49 +08:00
Xinyi Wang
d1a491ff3b feat: add continue/new support to chat frontends 2026-04-20 19:27:31 +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
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
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
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
aa674655a8 refactor: unify docstrings, add /resume command, simplify error msg 2026-04-16 21:04:04 +08:00
Liang Jiaqing
7cadbd7403 feat: i18n support - auto-detect system language for zh/en prompts 2026-04-16 18:47:40 +08:00
Liang Jiaqing
47bcb1b01a fix: compatible with Streamlit 1.56+ iframe API change 2026-04-16 17:48:58 +08:00
Liang Jiaqing
0591b68ff6 stapp: incremental freeze rendering for streaming segments
Replace full-redraw approach with frozen/live slot pattern:
- Completed segments are frozen into individual st.empty() slots
- Only the last (active) segment is re-rendered on each tick
- Reduces flicker and improves performance for long multi-turn conversations
2026-04-16 13:10:00 +08:00
Liang Jiaqing
3d7832a750 feat: multi code_run support, inline_eval logging & cwd fix, tool reinject upgrade 2026-04-16 12:56:17 +08:00
Liang Jiaqing
39f90149fb fix: change desktop pet port 51983->41983 (avoid Hyper-V reserved range) & update wechat group QR code 2026-04-15 23:50:48 +08:00
Jiaqing Liang
e3a2526932 feat: add plan mode (enter/exit/completion check/verification gate/periodic hints) 2026-04-15 17:02:54 +08:00
wjl2023
bb0290f576 fix: normalize bubble text and adjust padding for better readability 2026-04-15 14:43:14 +08:00
Liang Jiaqing
74abb77a0b refactor: rename default_model->model, add thinking_type support, fix pet urlopen error handling 2026-04-14 21:14:05 +08:00
Liang Jiaqing
793bb3f1b8 refactor(pet): extract PetBase, deduplicate _start_server/safe wrappers, add singleton guard 2026-04-14 12:05:55 +08:00
Liang Jiaqing
0b54df85be feat: desktop pet v2 with 8 skins and state notifications 2026-04-14 11:07:58 +08:00
Liang Jiaqing
0da9bd15c9 refactor: turn_end_callback + desktop pet + keychain
- agent_loop: next_prompt_patcher -> turn_end_callback with full context
- agent_loop: exit logic unified (break + callback), no early return
- ga: summary extraction moved from tool_after_callback to turn_end_callback
- ga: _turn_end_hooks support for external subscribers
- stapp: desktop pet button with HTTP status push
- keychain: XOR-masked secret storage with SecretStr
- gitignore: whitelist keychain.py
2026-04-13 18:27:17 +08:00
Jiaqing Liang
086599a5d6 fix: scroll ghost height reflow via overflow toggle; extend cache markers to last 2 user msgs; simplify cursor & merge JS fixes 2026-04-13 14:59:38 +08:00
Liang Jiaqing
ecb8ac9a80 fix(stapp): eliminate ghost duplicate of last text block on new message
Root cause: stream loop emitted a bare st.empty() heartbeat per tick, accumulating
dozens of empty slots under chat_message. On the next rerun the history replay
path had no such slots, so Streamlit's incremental DOM diff misaligned and left
the previous render of the last text block as a grayed-out ghost.

Fix: unify streaming and history replay under the same shell
(slot = st.empty(); with slot.container(): render_segments(...)). Heartbeat now
re-enters the same slot each tick; when response is unchanged Streamlit's diff
is a no-op (no flicker), but the container() call still lets StopException
propagate so abort keeps working. Simplified render_segments from 5 params
(placeholders/rendered_cache/force_text) to 2 (segments, suffix).

Net: +19 -20 lines. Verified: no ghost, abort interrupts mid-stream, per-turn
fold-collapse preserved.
2026-04-12 15:22:56 +08:00
Liang Jiaqing
3531146792 fix: restore stop signal detection broken by render_segments cache optimization
- stapp.py: add st.empty() after render_segments to force Streamlit StopException check on every iteration (incl. heartbeat)
- agentmain.py: fix nround type check, fix timeout comment
2026-04-11 16:25:19 +08:00
Liang Jiaqing
7bfd6e43e6 fix: _fix_messages for Claude API compliance, raw_ask simplify, no_tool orphan fix, summary extraction improvement 2026-04-11 13:24:33 +08:00
Liang Jiaqing
2977be33c6 Update llmcore truncation, adb_ui parsing, stapp regex, and subagent docs 2026-04-09 18:43:20 +08:00
YangChen-pro
520550a2b9 Fix /restore path and native log compatibility 2026-04-08 10:16:55 +08:00