mirror of
https://github.com/basketikun/infinite-canvas.git
synced 2026-08-05 17:04:27 +08:00
fix(agent): retain and display user messages immediately upon first send, improving user experience
This commit is contained in:
@@ -5,6 +5,7 @@
|
|||||||
+ [新增] 画布右侧Agent支持按当前账号可用范围选择Codex 模型与推理强度。
|
+ [新增] 画布右侧Agent支持按当前账号可用范围选择Codex 模型与推理强度。
|
||||||
+ [优化] Canvas Agent 升级至最新 Codex,启动时检查版本更新,
|
+ [优化] Canvas Agent 升级至最新 Codex,启动时检查版本更新,
|
||||||
+ [优化] 统一通过公共日志输出 Info 以上信息,美化转发日志时间。
|
+ [优化] 统一通过公共日志输出 Info 以上信息,美化转发日志时间。
|
||||||
|
+ [修复] Agent首次发送消息时立即保留并展示用户内容,不再晚于思考状态。
|
||||||
|
|
||||||
## v0.12.0 - 2026-07-30
|
## v0.12.0 - 2026-07-30
|
||||||
|
|
||||||
|
|||||||
@@ -231,7 +231,7 @@ export function LocalAgentPanel({ embedded, headless, autoConnect }: { embedded?
|
|||||||
enqueueEvent(async () => {
|
enqueueEvent(async () => {
|
||||||
const nextThreadId = data.activeThreadId ?? data.threadId ?? "";
|
const nextThreadId = data.activeThreadId ?? data.threadId ?? "";
|
||||||
const current = useAgentStore.getState();
|
const current = useAgentStore.getState();
|
||||||
const keepPendingMessage = Boolean(data.emptyThread && current.sending && current.activeThreadId === nextThreadId);
|
const keepPendingMessage = Boolean(data.emptyThread && current.sending && current.messages.some((message) => message.role === "user"));
|
||||||
pendingToolRef.current = null;
|
pendingToolRef.current = null;
|
||||||
setAgentState({ activeThreadId: nextThreadId, ...(keepPendingMessage ? {} : { messages: [] }), tokenUsage: null, pendingTool: null, pendingApprovals: [] });
|
setAgentState({ activeThreadId: nextThreadId, ...(keepPendingMessage ? {} : { messages: [] }), tokenUsage: null, pendingTool: null, pendingApprovals: [] });
|
||||||
if (!data.draftThread) await loadThreads(Boolean(data.emptyThread));
|
if (!data.draftThread) await loadThreads(Boolean(data.emptyThread));
|
||||||
|
|||||||
Reference in New Issue
Block a user