Skip to content

feat: Ask-Alice quick-chat launch (seeded TUI + daily chat workspace)#344

Merged
luokerenx4 merged 2 commits into
masterfrom
UI-issue
Jun 15, 2026
Merged

feat: Ask-Alice quick-chat launch (seeded TUI + daily chat workspace)#344
luokerenx4 merged 2 commits into
masterfrom
UI-issue

Conversation

@luokerenx4

Copy link
Copy Markdown
Contributor

Summary

  • Ask-Alice quick-chat launch — type a message → drop straight into the agent TUI already working on it. The 3rd spawn mode alongside headless + workspace launch, all sharing the same process injector (composeSpawnInputs).
  • Interactive-seed primitive: SpawnContext.initialPrompt threads through the spawn path into each adapter's interactive argv at the CLI-correct position (claude/codex -- <prompt>, opencode --prompt, pi trailing positional; shell ignores). Fresh-only.
  • POST /api/workspaces/quick-chat: one chat workspace per day (chat-<mon><day>, byte-aligned with the frontend defaultTagFor); each send is a new session = a conversation, resumable from the chat sidebar.
  • "Ask Alice" landing: new chat-landing view + composer (Chat type chip + a 4-CLI agent runtime picker wired to the agent override). Nav relabel Chat → "Ask Alice"/"问 Alice".

Test plan

  • npx tsc --noEmit clean (Alice src/)
  • cd ui && npx tsc -b clean (UI strict)
  • pnpm test passes (1946/1946)
  • Adversarial review of the diff → 4 real bugs found + fixed (pi seed drop via assigned-id, win32 .cmd-shim injection, spec coverage, first-of-day create race)
  • Demo walked in-browser: compose → agent dropdown (4 CLIs) → send → lands in session terminal; 0 console errors, no unmocked endpoints

Boundary touch

Touches the workspace spawn path and adds one new public route (behind the existing admin-token gate). Security: the seed appends user text to the interactive argv — opencode/pi are win32 .cmd shims, so the seed is dropped when resolveLaunchCommand reports viaShell, mirroring the headless path's BatBadBut (CVE-2024-27980) guard. No trading / auth / broker-credential / migration changes.

🤖 Generated with Claude Code

Ame and others added 2 commits June 15, 2026 12:01
…ng composer

Add a "type a message → you're in the agent TUI already working" front door,
the 3rd spawn mode alongside headless + workspace launch, all sharing the same
process injector (composeSpawnInputs).

Backend — interactive-seed primitive:
- SpawnContext.initialPrompt threads route → SessionFactoryContext →
  composeSpawnInputs → adapter.composeCommand, appended to the FRESH interactive
  argv per CLI: claude/codex `-- <prompt>`, opencode `--prompt`, pi trailing
  positional, shell ignores. Fresh-only.
- pi assigns its id at spawn, so it appends the seed alongside its `--session-id`
  (the factory captures isFresh before the assigned-id rewrite).
- win32 guard: opencode/pi are .cmd shims (cmd.exe wrap); drop the seed when
  resolveLaunchCommand reports viaShell, to avoid a BatBadBut injection surface.
- POST /api/workspaces/quick-chat: reuse-or-create the chat workspace (serialized
  so concurrent first launches don't double-bootstrap), spawn a seeded session,
  return {workspace, session}. Shares a new spawnInteractiveSession helper with
  /:id/sessions/spawn.

Frontend — "Ask Alice" landing:
- new chat-landing ViewKind + ChatLandingPage composer; nav relabel Chat →
  "Ask Alice"/"问 Alice". Bottom row: Chat type chip + a 4-CLI agent runtime
  picker (claude/codex/opencode/pi) wired to quickChat's agent override.
- SpawnOptions/SpawnOpts gain initialPrompt; demo handler + 4 locales + tab
  store version bump (5→6).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Key quick-chat find-or-create on TODAY's daily tag (`chat-<mon><day>`, e.g.
`chat-jun15`) instead of "the most-recent chat-template workspace". Enter
today's workspace if it exists, else create it; each send is a new session
inside today's workspace (conversations = sessions, resumable from the chat
sidebar). Traditional-chatbot feel, aligned with Workspace=daily-container /
Session=conversation.

The daily tag mirrors the frontend's `defaultTagFor` byte-for-byte (en-US
short month, lowercased) so a quick-chat-created daily workspace and a
form-created one on the same day converge on the same workspace instead of
duplicating. Replaces the prior `chat` / `chat-2` fallback tag.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jun 15, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
openalice-demo Ready Ready Preview, Comment Jun 15, 2026 4:20am

Request Review

@luokerenx4 luokerenx4 merged commit 940ba6a into master Jun 15, 2026
5 checks passed
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