139 Commits
Author SHA1 Message Date
gongzhiyong a9f28094bc fix: 移除 enterprise agent system prompt 中的来源标注指令(来源已通过 Gen-UI 卡片展示)
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 14s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 51s
2026-04-15 03:38:17 +08:00
gongzhiyong 1e3ecc6d44 fix: 在 markdown 渲染前清理裸来源标注词(覆盖句尾。工单等情况)
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 18s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 41s
2026-04-15 03:31:42 +08:00
gongzhiyong 2574dd2bbf fix: 旧线程历史加载降级 + 停止状态超时恢复 + 裸来源标注清理
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 15s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 48s
2026-04-15 03:21:38 +08:00
gongzhiyongandClaude Opus 4.6 99b3cda23c fix(P0): 恢复 handleNewThread 立即创建线程,移除 ensureThread 懒创建
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 19s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 49s
根因:ensureThread 异步 setCurrentThreadId 后 React 状态未同步刷新,
useStream 仍绑定 undefined threadId,thread.submit() 提交到错误线程。

修复:
- handleNewThread 恢复为 await client.threads.create()(立即创建)
- doSubmit 直接使用 currentThreadId(已同步可用)
- 移除 ensureThread、skipNextSwitchRef 等懒创建相关逻辑
- 空线程问题后续通过侧边栏过滤解决

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 03:08:25 +08:00
gongzhiyongandClaude Opus 4.6 fd84f07f1d fix(P0): 移除错误的 thread.switchThread 调用,恢复 fixer2 的修复
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 26s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
36e7197 误加回了 thread.switchThread(activeThreadId),覆盖了 96aafce 的正确修复。
switchThread 会清空 thread.messages 导致发消息后跳欢迎屏。
只保留 skipNextSwitchRef 阻止 useEffect 重复触发即可。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 02:56:37 +08:00
gongzhiyongandClaude Opus 4.6 36e7197994 fix(P0): 修复新线程发消息后跳回欢迎屏
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 38s
根因:ensureThread() 通过 setCurrentThreadId 设置新线程ID,但 React 状态
未同步刷新,useStream 仍绑定 threadId=undefined,导致 submit() 提交到
错误的线程。

修复:在 submit 前手动调 thread.switchThread(activeThreadId),确保
useStream 立即指向新创建的线程。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 02:51:45 +08:00
gongzhiyong 1c82092735 fix(P2): chip hover对比度 + 统一复制按钮 + 统一时间戳
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 22s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 49s
2026-04-15 02:49:54 +08:00
gongzhiyong 96aafcebac fix(P0): 修复发送消息后主区域跳回欢迎屏
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Has been cancelled
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Has been cancelled
2026-04-15 02:49:41 +08:00
gongzhiyongandClaude Opus 4.6 b548ed4f19 fix(P0): prevent thread.switchThread from clearing messages mid-stream
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 30s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 38s
When ensureThread() creates a new thread and calls setCurrentThreadId,
the useEffect fires thread.switchThread() again after doSubmit already
called it — wiping thread.messages mid-stream and showing the welcome
screen instead of AI replies.

Fix: add skipNextSwitchRef. When doSubmit creates a new thread and
manually calls thread.switchThread(), it sets the flag so the
subsequent useEffect is a no-op. Only needed for new threads (when
currentThreadId was null); existing-thread submits don't change
currentThreadId so the useEffect never fires.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 02:48:15 +08:00
gongzhiyongandClaude Opus 4.6 902c8331be fix: lazy thread creation — only create thread on first message send
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
Previously handleNewThread called client.threads.create() immediately,
leaving empty "新对话" threads in the sidebar when users clicked new
thread but never sent a message (ChatGPT-style behavior).

Now handleNewThread just resets UI state (setCurrentThreadId(null)).
A new ensureThread() helper in useConversation lazily creates the
backend thread only when the user actually submits a message.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 02:46:52 +08:00
gongzhiyongandClaude Opus 4.6 361b576c6c fix: show 历史记录不可用 for cross-session threads that fail to load
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 31s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
Wire threadLoadFailed from useConversation through ChatMessages props.
When a selected thread has no loadable history (expired checkpoint or
cross-deployment), show a contextual unavailable state instead of the
welcome screen so users understand the conversation exists but history
is inaccessible.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 02:41:06 +08:00
gongzhiyongandClaude Sonnet 4.6 7d179f9629 fix(ux): P1 COT leak + P2 scroll/stopped/bare-source fixes
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 27s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 36s
P1: Remove pre-tool content bubble above ToolCallStatus — COT thinking
text was rendering as a standalone white bubble duplicating the
collapsible thinking block inside ToolCallStatus (commit b27424e
regression).

P2-2: Auto-scroll now triggers on both thread.messages and thread.values
so streaming tokens keep the viewport following output.

P2-1: Show "回复已停止" italic hint when last AI message has no content
and is not loading — gives clear feedback after user stops generation.

P2-3: Strip bare source words (工单/知识库/网络/推断) at sentence end
in renderWithSourceBadges to remove trailing unbracketed source labels.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 02:25:02 +08:00
gongzhiyongandClaude Sonnet 4.6 820a40982e fix(P1): load thread state before switching threadId to prevent welcome flash
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 16s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 44s
Previously: setHistoricalMessages([]) + setCurrentThreadId() fired together,
causing a render where both thread.messages (cleared by switchThread) and
historicalMessages were empty → welcome screen shown.

Fix: await loadThreadState() first, then set historicalMessages/ui and
currentThreadId atomically. historicalMessages is populated before the
first render after the switch, so the welcome screen never flashes.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 02:01:20 +08:00
gongzhiyongandClaude Sonnet 4.6 23527b3bdc fix(P1): restore historical thread message loading after thread switch
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 47s
The threadJustSwitched suppression was too aggressive — it cleared
lastMessagesRef on every thread switch, then relied on historicalMessages
which loads async and may still be empty. Historical thread messages
would never appear.

Simplified fix: thread.switchThread() already clears thread.messages
when switching, so thread.messages is always safe to trust directly.
Use thread.messages when non-empty, else fall back to historicalMessages.
Removes threadJustSwitched / lastMessagesRef / lastThreadIdRef entirely.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:52:45 +08:00
gongzhiyongandClaude Sonnet 4.6 b27424e3a0 fix(ux): improve interaction feedback and fix pre-tool text rendering
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 17s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 44s
- Show pre-tool plainTextContent above ToolCallStatus (was silently
  dropped when hasThinking=false but plainText exists with tool_calls)
- Pre-tool thinking bubble gets proper bg-muted bubble styling and
  isStreaming=false (thinking is complete once tool calls start)
- handleRegenerate now sets concurrentStatus="generating" for
  consistent status bar feedback on regenerate
- Remove dead setConcurrentStatus prop from ChatInput interface/usage

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:51:28 +08:00
gongzhiyongandClaude Opus 4.6 60d131c5d0 fix: 更正 CloudCost API 默认地址为后端 Container App
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 15s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 51s
前端 Static Web App 地址无 API,改为正确的后端地址。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 01:42:40 +08:00
gongzhiyong 36f85eb224 Revert "feat(ui): remove tool selection chips from below input area"
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 15s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
This reverts commit 059ec40845.
2026-04-15 01:33:18 +08:00
gongzhiyongandClaude Sonnet 4.6 059ec40845 feat(ui): remove tool selection chips from below input area
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 45s
ConfigPanel (model mode + tool group chips) is no longer rendered in
the chat layout. Tool selection was surfaced below the input after the
previous refactor but users found it visually noisy. activeTools still
drives tool filtering on submit; UI selection can be re-exposed later
via a dedicated settings entry point.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:31:47 +08:00
gongzhiyongandClaude Opus 4.6 53f6b99467 fix(ui): 删除默认页输入框下方的快捷按钮
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 14s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 49s
用户反馈输入框下方的工具快捷按钮(搜索知识库/查看最新工单等)很丑,直接移除。

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-15 01:30:35 +08:00
gongzhiyongandClaude Sonnet 4.6 b59f672033 feat(ui): replace collapsible config summary bar with always-visible tool chips
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 14s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 46s
Remove the "Auto · 云费用 1" summary toggle button that occupied a
dedicated line below the textarea. Model mode and tool group chips are
now displayed inline and always visible, eliminating the redundant
status row while keeping all selection controls accessible.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:29:31 +08:00
gongzhiyongandClaude Sonnet 4.6 3d723e5705 feat(ui): remove redundant tool status hint line below input
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 19s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
The "可分析工单、查知识库" / "已启用 X 个工具" hint paragraph
below the textarea was redundant — ConfigPanel already shows the
active tool count in its summary button. Removed the <p> block and
the now-unused activeTools destructuring in ChatInput.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:25:03 +08:00
gongzhiyongandClaude Sonnet 4.6 0908e983fb fix(ui): P0 线程切换时调用 switchThread 彻底清除 error 状态
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 38s
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 45s
useStream 的 error 跨线程持久化,切换 threadId 时不自动重置。
useEffect 监听 currentThreadId 变化,调用 thread.switchThread()
清除 error、messages 等所有旧状态,从根本上解决切换线程后
红色错误横幅残留问题。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:18:16 +08:00
gongzhiyongandClaude Sonnet 4.6 dc7d443b19 fix(ui): ConfigPanel 展开时隐藏快捷按钮,消除视觉重复
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 43s
工具面板(ConfigPanel)和快捷按钮(QUICK_PROMPTS)功能高度重叠,
同时展示造成"重复"感。ConfigPanel 展开时将 showQuickPrompts 设为 false,
收起时恢复显示,两套入口不再同时出现。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:08:53 +08:00
gongzhiyongandClaude Sonnet 4.6 671e708bb5 fix(ui): P0 切换空线程不显示错误横幅
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 35s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 37s
thread.error 在 useStream 切换 threadId 时不会自动清除,
导致切换到空新对话时残留旧线程的 error 触发红色错误横幅。
修复:activeMessages.length === 0 时抑制错误横幅,
空线程不可能有工具执行异常,无需展示该提示。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 01:05:14 +08:00
gongzhiyongandClaude Sonnet 4.6 ac1eaf63c3 fix(ui): P1-1 彻底修复线程切换竞态 — 抑制 useStream 旧数据
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 17s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 57s
useStream 在 threadId 变更后仍有一个渲染周期保留旧线程的 messages。
新增 threadJustSwitched 标记,切换时忽略 thread.messages,强制走
historicalMessages(新线程为空),保证欢迎页必然显示。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 00:59:38 +08:00
gongzhiyongandClaude Sonnet 4.6 c610e23931 fix(ui): P1-1 线程切换残留内容 + P2-5 列表项来源标注渲染
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 15s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 46s
- main.tsx: 切换 threadId 时清空 lastMessagesRef,避免空对话显示上一条对话内容
- MessageBubble.tsx: li 元素增加 renderWithSourceBadges,[工单][知识库] 等标注在列表项中也渲染为彩色 badge

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 00:55:02 +08:00
gongzhiyongandClaude Sonnet 4.6 31bddf4fcd fix(ui): 优化首屏欢迎区域和快捷按钮布局
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 24s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 50s
- ChatMessages: 空状态增加品牌图标+大标题,视觉层次更清晰
- ChatInput: 快捷按钮去除 max-w-sm 限制,改为全宽 2列布局,圆角统一为 rounded-xl

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 00:49:10 +08:00
gongzhiyongandClaude Opus 4.6 bcb89dc8b9 fix: P1 体验修复 — 隐藏空对话导出按钮 + 发送后自动滚动
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 15s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 45s
- ConfigPanel: activeMessages 为空时隐藏导出按钮,减少界面噪音
- main.tsx: doSubmit 后 scrollIntoView 确保用户消息可见

Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 19:01:49 +08:00
gongzhiyongandClaude Opus 4.6 3b7578ac91 fix: 修复新对话体验核心问题 (P0+P1)
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 15s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 49s
P0-1: 新建对话不切换到空白页面 — handleNewThread 添加历史消息清理
P0-2: 侧边栏标题始终显示"新对话" — applyThreadTitle 检测占位符标题
P0-3: 快捷按钮体验优化 — 完整句子自动发送,不完整句子聚焦输入框
P1: KB冷启动技术错误信息友好化 — PRECONDITION_FAILED等显示黄色提示

Constraint: 不改变功能逻辑,仅修复交互体验问题
Rejected: 重写新对话创建流程 | 改动范围过大风险高
Confidence: high
Scope-risk: narrow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:57:11 +08:00
gongzhiyongandClaude Opus 4.6 daa86280a0 refactor: 前端架构重构 + P1 交互增强 + 类型安全修复
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 45s
main.tsx 拆分为模块化架构(1351→~462行):
- 提取 useConversation/useConfig hooks
- 提取 ChatMessages/ChatInput/ConfigPanel 组件
- 提取 shared/ 下公共组件(CopyButton/FeedbackButtons/ExportButton/CardErrorBoundary)

消除全部 as any 类型转换(9个文件,使用正确 TypeScript 类型替代)

ThreadSidebar 增强:
- 修复"新对话"标题不更新 bug
- 新增内联重命名(双击编辑)
- 新增对话置顶/取消置顶
- 移动端触摸优化(44px tap targets)

MessageBubble 增强:
- hover 显示消息时间戳
- 对话分支按钮(UI scaffold)
- 移动端响应式(COT/代码块/操作栏)

ToolCallStatus 移动端适配(紧凑时间线/截断工具名/小图标)

新功能脚手架:
- DeepResearchToggle 深度搜索开关组件
- enterprise next-actions 企业闭环动作按钮
- conversation.ts 类型定义(ForkPoint/DeepResearchConfig/NextAction)

Constraint: 各 worker 按文件隔离避免冲突
Rejected: 单人串行重构 | 耗时过长且容易遗漏
Confidence: high
Scope-risk: broad
Not-tested: 深度搜索和对话分支的端到端集成(仅 UI scaffold)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:09:26 +08:00
gongzhiyongandClaude Sonnet 4.6 c4323cad1c feat: 前端添加 CloudCost 工具选择和工具状态映射
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 28s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
- TOOL_GROUPS 添加云费用工具组(DollarSign 图标)
- TOOL_TO_UI 添加 cloudcost_* → cost-result 映射
- QUICK_PROMPTS 添加查询云费用快捷入口
- ToolCallStatus UI_NAME_MAP 添加 cloudcost 工具映射

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 03:39:24 +08:00
gongzhiyongandClaude Sonnet 4.6 a6ae0ef5eb feat: 集成 CloudCost 云管系统作为运营大脑数据源
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 26s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 42s
- 新增 cloudcost-client.ts:5 个 API 函数(dashboard/metering/detail/alerts/accounts)
- config.ts 添加 cloudcost.apiBase(默认 orange-wave-09002e800.7.azurestaticapps.net)
- toolConfig.ts 添加 cloudcost_* 超时/重试配置
- CLAUDE.md 更新架构图和 env var 文档

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 03:35:25 +08:00
gongzhiyongandClaude Sonnet 4.6 d93bb5966c feat(enterprise): add CloudCost cloud cost management tools (5 tools)
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 17s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 43s
Add cloudcost_dashboard, cloudcost_metering, cloudcost_detail, cloudcost_alerts,
and cloudcost_accounts tools to the enterprise agent with full Gen-UI card support.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 03:29:47 +08:00
gongzhiyongandClaude Sonnet 4.6 5c3e6f18e2 feat: add CostResult Gen-UI card component with 5 display modes
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 13s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 47s
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-14 03:19:30 +08:00
gongzhiyong 29e77c2b6a fix: resolve TypeScript errors in main.tsx and MessageBubble
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 21s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 40s
2026-04-14 02:43:55 +08:00
gongzhiyongandClaude Haiku 4.5 aec776e60c refactor: extract utility modules from main.tsx
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 22s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 11m20s
- Split 1504-line monolithic main.tsx into 5 utility modules:
  - src/utils/tool-maps.ts (TOOL_GROUPS, TOOL_TO_UI, MODEL_OPTIONS, QUICK_PROMPTS)
  - src/utils/input-handling.ts (keyboard shortcuts, textarea, event listeners)
  - src/utils/thread-management.ts (deduplication, thread helpers)
  - src/utils/message-rendering.ts (tool call extraction, UI matching)
  - src/utils/api-client.ts (LangGraph API client operations)
- Add missing deps: unist-util-visit, hast
- Update agent model configs (opus for backend, haiku for tester)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-04-14 02:18:28 +08:00
gongzhiyongandClaude Opus 4.6 179aab55f0 fix: show full AI reply by default instead of collapsed summary
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 18s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 47s
- Change summaryExpanded default from false to true
- Long replies (>800 chars) now display full text immediately
- Users can still collapse with "收起" button if needed

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 01:31:02 +08:00
gongzhiyongandClaude Opus 4.6 eb200cbdfd fix: feedback buttons always visible, thread title update for untitled threads
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 30s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 34s
- Remove opacity-0 group-hover from ThumbsUp/ThumbsDown buttons — always visible
- Fix thread title: update title whenever currentTitle is empty, not just first message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 01:29:27 +08:00
gongzhiyongandClaude Opus 4.6 d53655c180 fix: card occlusion by input bar, thread title update for existing threads
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 17s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 43s
- Add h-32 spacer before bottomRef to prevent last card from being hidden behind input bar
- Fix thread title not updating: check existing title instead of only first message

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 01:11:47 +08:00
gongzhiyongandClaude Opus 4.6 182f6e358c feat: interaction upgrades — feedback buttons, export, shortcuts, input unlock
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 34s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 36s
- Add ThumbsUp/ThumbsDown feedback buttons on AI messages (hover reveal)
- Add ExportButton to export conversation as Markdown file
- Add global keyboard shortcuts: Ctrl+Shift+O (new thread), Ctrl+Shift+S (sidebar), / (focus input), Esc (stop)
- Unlock textarea during AI generation (remove disabled={thread.isLoading})
- Smart title truncation at word/punctuation boundary (30 chars)
- Show tool inputSummary in ToolCallStatus execution log

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 01:07:43 +08:00
gongzhiyongandClaude Opus 4.6 244a6d4a1f feat: next-gen COT system — streaming reasoning, structured thinking, timeline UI
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 20s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 39s
- Expand COT prompts from 30-char to 80-200 char structured reasoning (all 4 agents)
- Add source/meta fields to thinking blocks (inject-thinking.ts)
- Add invokeWithReasoningStream() for Pro mode streaming reasoning (create-llm.ts)
- Add writer agent injectThinking + stripThinkingBlocks support
- Frontend: Brain pulse animation, real-time timer, tool summary on collapse
- Frontend: Markdown rendering for reasoning source, plain text for prompt source
- Frontend: Timeline layout with connector dots for multi-tool calls (ToolCallStatus)
- Fix main.tsx isStreaming passthrough for thinking messages

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 00:20:20 +08:00
gongzhiyongandClaude Sonnet 4.6 157a3c6a83 feat: add frontend remote log uploader for Docker visibility
Trigger auto deployment for soc-langgraph / build-and-deploy (push) Failing after 14s
Deploy LangGraph UI to Azure Static Web Apps / build-and-deploy (push) Failing after 49s
- POST /api/client-log endpoint in http.ts (Hono, no auth, 204 response)
  prints batched log entries to stdout so `docker compose logs` shows them
- New src/utils/remote-log.ts: remoteLog/remoteWarn batch to backend every 500ms
- Replace all bracket-tagged diagnostic console.log/warn calls in main.tsx and
  ToolCallStatus.tsx with remoteLog/remoteWarn (tags: thread-ui, ui-debug,
  render-msg, orphan-match, orphan-name-match, orphan-result, streaming-orphan,
  tool-ui-match)
- Add /api/client-log proxy entry to vite.config.ts so dev server forwards
  the request to the LangGraph backend (port 2024)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 17:33:43 +08:00
gongzhiyongandClaude Opus 4.6 2218bbcfef feat: integrate Azure OpenAI Responses API for Pro mode COT reasoning
When modelMode is "pro", searcher/enterprise/coder agents now call the
Responses API directly via fetch to obtain reasoning summary blocks.
The reasoning text is injected as a { type: "thinking" } content block
in the AIMessage, while flash/auto modes remain unchanged using the
existing Chat Completions path through AzureChatOpenAI.

Key changes:
- create-llm.ts: add invokeWithReasoning() with inline zod-to-JSON-Schema
  converter and Responses API output parser (reasoning/message/function_call)
- All three agent nodes: Pro branch converts LangChain messages to
  Responses API format (developer role, function_call_output for tool
  results, function_call for AI tool invocations)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 17:07:22 +08:00
gongzhiyongandClaude Opus 4.6 2422ea39c6 fix: prevent duplicate card rendering during streaming
Streaming orphan UI cards section was rendering all cards with message_id=NONE
as orphans, even when they were already claimed by the message-level orphan
matching logic via card_id. Added card_id+tool_call_id check to prevent
double rendering.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 16:38:00 +08:00
gongzhiyongandClaude Sonnet 4.6 bfcf22d4f8 fix: 修复 AI 消息渲染顺序错乱和搜索结果卡片重复问题
有 tool_calls 的中间 AI 消息不再渲染独立 MessageBubble 正文气泡,
thinking 内容移至 ToolCallStatus 上方作为步骤说明,
最终 AI 消息(无 tool_calls)才渲染 MessageBubble,确保工具步骤在前、正文回答在后。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:44:36 +08:00
gongzhiyongandClaude Opus 4.6 7d035b21b7 fix: COT rendering, react-markdown crash, checkpoint pollution, subgraph ui.push
- MessageBubble: add thinking block rendering (collapsible COT panel with Brain icon)
- MessageBubble: add rehypeSanitizeLinks plugin to fix react-markdown v10 href crash
- MessageBubble: add MarkdownErrorBoundary for graceful fallback
- general-input: add cleanPollutedToolCalls to prevent checkpoint pollution
- force-summary: add cleanPollutedToolCalls for searcher MAX_ITERATIONS path
- searcher/coder/writer tool-executor: remove { message } binding from ui.push (fixes msg_id=NONE)
- docker-compose: fix VITE_LANGGRAPH_URL to localhost:2024 for local dev

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-13 15:39:57 +08:00
gongzhiyongandClaude Sonnet 4.6 e9808cc44f fix: deduplicate messages and UI cards when streamSubgraphs is true
With streamSubgraphs:true, subgraph values events push messages that
the parent Supervisor later merges, causing the same message.id to
appear multiple times in thread.messages. Similarly, the same card_id
can appear in both subgraph and parent values snapshots.

- Add deduplicateMessages() at module level: keeps the last (most
  up-to-date) copy per message.id, eliminating duplicate AI messages
  caused by subgraph-then-parent merge events.
- Apply deduplicateUiItems() to the full allUi array before per-message
  card matching, so loading→done card pairs pushed by subgraphs and
  parent are collapsed globally before orphan attribution runs.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:36:40 +08:00
gongzhiyongandClaude Sonnet 4.6 09a0021007 feat: upgrade langgraph-sdk to 1.8.8 and enable streamSubgraphs
- Upgrade @langchain/langgraph-sdk from 0.0.73 to 1.8.8
- Add streamSubgraphs: true to both thread.submit() calls (doSubmit + handleRegenerate)
- Enables real-time Gen-UI card streaming from subgraphs (searcher/coder/writer)
- Verified: values|searcher:* SSE events now appear in stream output

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:29:10 +08:00
gongzhiyongandClaude Sonnet 4.6 d0ea8ab8b6 fix: add messages streamMode to eliminate 18s blank during subgraph tool execution
Both thread.submit() calls now use streamMode: ["values", "messages"] so the
frontend receives real-time LLM token stream from subgraphs (searcher/coder/writer)
during the tool execution phase, eliminating the skeleton-only blank period.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 15:21:48 +08:00
gongzhiyongandClaude Sonnet 4.6 a55c264cc0 fix: 禁用并发消息发送,改为串行模式
AI 回复流式输出期间禁用输入框和 Enter 提交,防止并发请求导致状态混乱。
移除并发对话弹窗和消息排队逻辑,简化为直接 disabled。

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-13 14:01:07 +08:00