Skip to content

Add PTY agents (Claude Code, Gemini, Codex) to AI Chat model selector #1450

Closed

Description

@malibio

Problem

The AI Chat model selector only shows Local and Ollama models. PTY agents (Claude Code, Gemini CLI, Codex) are never surfaced as options, even when installed.

The infrastructure exists:

  • pty-terminal.svelte — renders the xterm terminal
  • ai-chat-pty-session.svelte — wraps it for the AI chat viewer
  • agent-store.svelte.ts — detects installed agents (claude, gemini, etc.) with available flag
  • agent-selector.svelte — a separate dropdown that shows detected agents
  • ai-chat-node-viewer.svelte — already routes on provider === 'pty' to render AiChatPtySession

But ai-chat-model-selector.svelte has no PTY section, and ModelSelection type only includes 'native' | 'ollama' | 'openai-compat' — 'pty' was never wired in.

Acceptance Criteria

  • Model selector shows a "PTY Agents" section when at least one agent is detected as available
  • Each available agent (Claude Code, Gemini CLI, Codex) appears as a selectable option
  • Unavailable/not-installed agents are either hidden or shown disabled
  • Selecting a PTY agent emits { provider: 'pty', modelId: agentId } via onSelect
  • ModelSelection type updated to include provider: 'pty'
  • ai-chat-node-viewer.svelte handles the new selection and sets provider: 'pty' on the node
  • Agent detection reads from agentStore.availableAgents (already detects installed binaries)

Activity

  1. malibio commented on Jul 11, 2026

    @malibio
    CollaboratorAuthor

    Frontend baseline: 159 test files passed, 4025 tests passed. Starting implementation.

  2. self-assigned this
    on Jul 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions