Repository navigation
AI 智能任务:可停止/Esc 取消、发送后清空输入框、切页保留任务,编排支持 AI 出图与检查更新 - #46
Merged
Merged
Conversation
- 新增 generate_image 工具:可无输入直接出图,也可用参考图改图,结果能接着交给后续步骤 - 未配置生图 Key 时在规划阶段拒绝该步骤,并提示去设置 - 新增 check_update / open_page 应用级工具,回复里可带跳转按钮 - 规划请求被取消时回滚会话状态 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_017bLiAcBunV9QFg5mss2f9N
- 第二条起发送后输入框未清空:同步刷新输入框控件 - 发送按钮在忙碌时变为停止;Esc 停止规划(恢复原消息),执行中先弹确认 - 对话状态提升到模块级,切换标签或换主题后仍能看到并控制正在执行的任务 - 回到页面时重新读取模型配置,方案卡片提示哪一步会联网 Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_017bLiAcBunV9QFg5mss2f9N
|
Seems you are using me but didn't get OPENAI_API_KEY seted in Variables/Secrets for this repo. you could follow readme for more information |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Requested by ColeMao · project thread
Before: 在 AI 智能任务里误发的消息没法撤回,AI 会一直规划下去。从第二条消息起,发送后输入框里的文字还留着。任务执行到一半时切到别的标签再回来,对话和正在执行的任务都不见了。AI 编排也调不动 AI 出图、检查更新这类功能。
After: 规划或执行时,发送按钮会变成停止键,也可以按 Esc。规划中直接停下,原消息放回输入框。执行中会先弹确认,再停。发送后输入框总会清空。切页或换主题回来,对话和执行中的任务都还在,进度会继续刷新。AI 编排新增三种能力:AI 出图(可以直接出图,也可以带参考图,结果能接着转 PDF 等)、检查更新(会遵循当前的更新渠道)、打开应用里任意页面(回复里带跳转按钮)。如果没配置生图 Key,规划阶段就会说明,并给出「去设置」按钮。方案卡片底部会标出哪一步会把提示词发给生图服务。
How:
_Conversation。路由每次会重建AiTaskPage,异步回调统一投递给当前页面。卡片状态拆成了CardModel。AgentSession.send/retry捕获CancelledError,回滚消息、方案和备注。页面恢复输入内容,并恢复被标记为过期的卡片。update()的控件,之前只刷新了消息流,现在会一并刷新输入框。generate_imageToolSpec(min_inputs=0,network=True),以及check_update/open_page应用级工具。回到页面时会重新读取模型配置,这样「去设置填 Key → 回来重试」能生效。验证
uv run ruff check .→ All checks passeduv run pytest -q→ 252 passed, 2 skipped(新增会话回滚、出图链路、无 Key 拒绝、检查更新、打开页面、Esc 停止、执行中确认、切页保留等测试)🤖 Generated with Claude Code
https://claude.ai/code/session_017bLiAcBunV9QFg5mss2f9N
Generated by Claude Code