Skip to content

0.2.8#176

Merged
XingYu-Zhong merged 35 commits into
masterfrom
develop
Jun 10, 2026
Merged

0.2.8#176
XingYu-Zhong merged 35 commits into
masterfrom
develop

Conversation

@XingYu-Zhong

Copy link
Copy Markdown
Collaborator

No description provided.

leesta24 and others added 30 commits June 8, 2026 15:37
Allow changing a thread's workspace after creation so users can
move a session to a different directory without switching threads.

Changes:
- Add workspace field to UpdateThreadRequest Zod schema (kun/contracts)
- Accept workspace in ThreadService.update() (kun/services)
- Add updateThreadWorkspace to AgentProvider interface and Kun runtime
- Update chooseWorkspace() to PATCH the active thread's workspace
  when the user picks a new directory, keeping the current session
- Add 6 unit tests for UpdateThreadRequest workspace validation
… fails (fixes #78)

When the runtime probe failed (e.g. port 8899 already in use, as in #78),
the chat timeline showed a vague '正在唤醒本地智能体' title and only put
the real error in a faint detail paragraph below. Users skimmed the title,
assumed the app was still loading, and never opened Settings to fix the
port conflict.

The fix: when `runtimeError` is non-empty, switch the title to a generic
'无法连接到本地运行时 / Cannot connect to the local runtime' and show
the localized error (e.g. '运行时端口已被占用...') in the body slot,
where users actually look when something is wrong.

When no error is available (initial probe or after a clean retry), the
hero falls back to the existing 'waking' copy.

Files:
- src/renderer/src/components/chat/message-timeline-empty.tsx (+11/-2):
  split the hero title and detail branches on whether runtimeError is set
- src/renderer/src/locales/{zh,en}/common.json: add runtimeErrorHeroTitle
- src/renderer/src/components/chat/message-timeline-empty.test.ts (new):
  6 tests covering the empty / error / whitespace / zh-CN paths
When a turn's busy watchdog fires after exhausting recovery attempts, the
user sees a vague '长时间未收到运行时完成事件' message with no clue how long
they actually waited. For deep-thinking models (DeepSeek-R1, o1) and complex
multi-step tasks, a 3-minute-per-attempt × 3 attempts = 9-minute wait is
genuinely within the normal range, not 'hung'.

The fix is purely presentational: interpolate the effective wait minutes
(rounded from BUSY_WATCHDOG_MS * MAX_BUSY_RECOVERY_ATTEMPTS / 60_000) into
the existing busyTimeout i18n string. No new files, no behavioral change,
no timing tweak. If maintainers later decide the timeout itself should be
configurable or extended, that's a separate decision.

Files:
- src/renderer/src/store/chat-store-runtime.ts: pass minutes to i18n.t
- src/renderer/src/locales/{zh,en}/common.json: add {{minutes}} slot + framing
  for deep-thinking models
- src/renderer/src/store/chat-store-schedulers.test.ts (new): 4 tests
  covering watchdog message contract + minutes interpolation
Only return early after picking a workspace when updateThreadWorkspace
actually succeeds. Previously the early return triggered whenever an
active thread existed, so if the runtime lacked updateThreadWorkspace or
the PATCH threw, the global workspaceRoot moved to the new directory
while the active thread stayed on the old one — leaving the UI and the
thread's real workspace diverged. Track success with movedActiveThread
and fall through to the existing selection/creation fallback otherwise.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Switch all 9 outbound sendFeishuMessage call sites from { text } to
{ markdown } so the Lark SDK takes the markdownConverter:'builtin' path
and produces msg_type:'post' with tag:'md' content. Feishu / Lark clients
now render bold, inline code, code fences, headings, lists, blockquotes,
links, and <at> mentions natively instead of showing the raw markdown
source.

Mirror path was already correct (formatFeishuMirrorText returns
{ markdown: string }); no change there.

OpenSpec change: openspec/changes/feishu-markdown-render/

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When a Feishu / Lark inbound message triggers an agent run, immediately
add a 🫡 (emoji_type 'OnIt') reaction on the user's original message so
they see feedback before the agent turn completes (5-30+ seconds). The
reaction is left in place after the agent finishes as a 'handled' marker.

Also includes a small follow-up fix that registers a no-op handler for
im.message.message_read_v1 to silence the 'no im.message.message_read_v1
handle' warn emitted by the SDK on every read receipt (the high-level
bridge.on(...) API has no entry for read receipts in its EventMap, and
the SDK's internal EventDispatcher does not pre-register a handler
either).

Emoji type selection: 'OnIt' was picked over alternatives because:
  - 'WORK' was rejected by the API (code 231001) in production
  - 'OnIt' has been confirmed-valid in production (renders as 🫡,
    the internet-canonical 'got it, doing it' signal — best match for
    the user-requested '在做了')
  - 'SMILE' (🙂) is the confirmed-valid fallback if 'OnIt' is ever
    rejected

Failure handling: the addReaction call is wrapped in try/catch +
logError. A reaction failure NEVER aborts the agent run, since the
user's message must not be lost due to a reaction API blip.

OpenSpec change: openspec/changes/feishu-pending-indicator/

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…t-message

fix(runtime-hero): surface specific runtime error in title when probe fails (fixes #78)
…age-with-minutes

fix(chat): surface actual wait time in busy-timeout error (#131)
Deduplicate repeated file change summaries / 合并重复文件改动摘要
Preserve full assistant replies split by tool output / 保留被工具输出分隔的完整回复
Add composer access and change review controls / 新增输入框权限与改动审查入口
feat: support updating thread workspace via PATCH
Restore unfinished SDD drafts / 恢复未完成的新建需求
fix(feishu improvements):处理markdown渲染以及BOT对话响应优化
fix(ui): align chat toolbar with session header
- Added waitForRuntimeTurnsIdle function to manage runtime idle state.
- Introduced runtimeThreadsListHasActiveTurn utility for checking active turns.
- Created managed-runtime-idle.ts and corresponding tests in managed-runtime-idle.test.ts.
- Updated index.ts to integrate new idle management functionality.
- Enhanced FloatingComposer to prevent interaction during drag events.
…ed runtime thread

- Updated FloatingComposer to enable input when no active thread is selected.
- Adjusted logic to manage composer state based on runtime readiness.
- Ensured the send button is disabled until a working directory is chosen.
…interaction

- Updated FloatingComposer to maintain editable draft state while loading runtime.
- Adjusted textarea to ensure full width and proper focus behavior.
- Added loading indicator to send button during runtime readiness checks.
- Modified Workbench component to prevent drag interactions on the composer.
- Enhanced tests to verify new functionality and ensure proper behavior during loading states.
… and adjust related components

- Changed DEFAULT_SANDBOX_MODE from 'workspace-write' to 'danger-full-access'.
- Updated references in threads and domain thread files to use the new default sandbox mode.
- Modified FloatingComposer to remove execution access controls from the UI.
- Ensured tests reflect the updated behavior regarding sandbox mode and execution controls.
@XingYu-Zhong XingYu-Zhong merged commit f1f8d1b into master Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants