Skip to content

feat(chat): Ask / Plan / Craft conversation modes (#616) - #623

Open
huangcheng wants to merge 5 commits into
TencentCloud:developfrom
huangcheng:feature/conversation-modes
Open

feat(chat): Ask / Plan / Craft conversation modes (#616)#623
huangcheng wants to merge 5 commits into
TencentCloud:developfrom
huangcheng:feature/conversation-modes

Conversation

@huangcheng

Copy link
Copy Markdown
Contributor

Summary

  • Add turn-scoped conversation modes (问答 / 计划 / 默认) via LangGraph middleware: denylist tools + system hint, with hard rejection in wrap_tool_call (Ask/Plan also block task / acp_runner / ask_agent).
  • Dashboard composer picker, agent default_conversation_mode, PlanReady card, and silent Plan→Craft handoff via plan_brief (no pink user bubble).
  • Follow-up hardening: keep composer resources on Plan execute, persist mode per thread, pass planBrief on new sessions, contiguous plan todos, shared mode Select options.

Closes #616

Test plan

  • Unit: uv run pytest tests/unit/agents/test_conversation_mode.py tests/unit/agents/test_conversation_mode_middleware.py tests/unit/agents/test_plan_artifact.py tests/unit/api/test_chat_conversation_mode.py tests/unit/api/test_agent_conversation_mode.py tests/unit/gateway/test_processor_conversation_mode.py tests/unit/i18n/test_conversation.py -q
  • Dashboard: cd dashboard && npx tsc --noEmit (pre-commit also runs npm run build)
  • Manual: Plan mode → PlanReady → Execute builds artifact without wiping skills/KB; Ask mode cannot create workspace files; mode sticky per thread
  • CHANGELOG #616 entries present

Turn-scoped conversation_mode stamps tools and system hints through
ConversationModeMiddleware (no harness kernel changes). Dashboard adds
mode picker, PlanReady silent Craft handoff with plan_brief, and agent
default mode on create/edit.
Keep composer resources when executing a plan, persist mode per thread, and
pass planBrief on new sessions so Plan→Craft handoff does not drop context.
Fall back to agent default mode and /mode thread sticky when meta omits
mode; Ask blocks write_todos; PlanReady needs todos or a long brief;
add agent default_knowledge_base_ids and document builtin-only denylist.
Preserve the composer conversation mode when an empty/pending chat gets
its first thread id, and ignore stale __pending__ overrides so Ask/Craft
turns are not forced back into Plan.
Scope plan brief collection to the latest user→assistant turn so a short
ack after an earlier todos turn cannot reopen PlanReady with old steps.
@huangcheng
huangcheng force-pushed the feature/conversation-modes branch from 334854b to 8c57aa8 Compare September 9, 2026 13:31
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.

1 participant