Skip to content

feat: add native chat surface#2402

Draft
MRL-00 wants to merge 22 commits into
generalaction:mainfrom
MRL-00:main
Draft

feat: add native chat surface#2402
MRL-00 wants to merge 22 commits into
generalaction:mainfrom
MRL-00:main

Conversation

@MRL-00

@MRL-00 MRL-00 commented Jun 6, 2026

Copy link
Copy Markdown

Summary

Adds an adapter-backed native chat surface for supported local agents, alongside the existing terminal-based conversation flow.

This includes:

  • native chat routing for supported providers while preserving terminal mode for unsupported or remote tasks
  • structured streaming adapters for Codex, Claude Code, and Pi
  • provider-specific model, reasoning, speed, and access controls
  • slash menu actions and skill entries grouped by provider compatibility
  • image attachment thumbnails and image viewing support
  • persistent native chat transcripts across app restarts
  • sticky per-provider native chat options
  • terminal fallback and session handoff behavior

Validation

  • pnpm run typecheck
  • pnpm run format:check
  • pnpm run lint

Note: lint passes with an existing upstream warning in src/renderer/features/automations/use-automations.ts.

Matt List and others added 22 commits June 6, 2026 11:57
User messages now carry structured attachments instead of a text-only
[Attached: ...] suffix. Image attachments render as expandable thumbnails
in the transcript (loaded over a new nativeChat.readAttachmentImage RPC
with extension allowlist and an 8MB cap, falling back to a file chip when
unreadable), and composer chips show live object-URL previews for images
before sending.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Inline code in both markdown variants now renders as a real pill (the old
bg-muted token does not exist in the theme, so backticked names rendered
flat). When a surface passes onOpenFile, inline code spans that look like
workspace file paths become clickable and open in the file editor; the
chat panel wires this to openFileInTaskEditor with line/column suffixes
stripped.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Work from the parallel session, committed as-is so transcript persistence
can build on top.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Transcripts previously lived only in main-process memory, so reopening
Emdash showed an empty chat body even though the provider session resumed.
Each conversation now persists to a JSON file under
userData/native-chat-transcripts/ (atomic tmp+rename writes, debounced
during turns, flushed on turn end and dispose). getState falls back to the
persisted file when no session is live, startTurn rehydrates items and the
turn sequence so new turn keys never collide, and deleting a conversation
removes its transcript. Switching terminal<->native keeps it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Changing the composer's model/reasoning/speed now also saves the trio as
that provider's defaults (new nativeChatDefaults app setting), and new
native-chat conversations are seeded from them at creation in both the
new-conversation and task-creation flows. Clearing an option back to
Default clears the saved default too; access mode is excluded since
agentAutoApproveDefaults already covers it at creation.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
feat: Add adapter-backed native chat surface
feat(native-chat): remember model, reasoning, and speed per provider
…-upstream

# Conflicts:
#	src/main/core/tasks/operations/createTask.ts
#	src/main/index.ts
#	src/shared/conversations.ts
# Conflicts:
#	src/main/core/conversations/createConversation.ts
#	src/main/core/settings/schema.ts
#	src/main/core/tasks/operations/createTask.ts
#	src/main/index.ts
#	src/shared/conversation-config.test.ts
#	src/shared/conversation-config.ts
#	src/shared/core/conversations/conversations.ts
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