feat: Ask-Alice quick-chat launch (seeded TUI + daily chat workspace)#344
Merged
Conversation
…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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
composeSpawnInputs).SpawnContext.initialPromptthreads 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 frontenddefaultTagFor); each send is a new session = a conversation, resumable from the chat sidebar.chat-landingview + composer (Chat type chip + a 4-CLI agent runtime picker wired to theagentoverride). Nav relabel Chat → "Ask Alice"/"问 Alice".Test plan
npx tsc --noEmitclean (Alicesrc/)cd ui && npx tsc -bclean (UI strict)pnpm testpasses (1946/1946).cmd-shim injection, spec coverage, first-of-day create race)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
.cmdshims, so the seed is dropped whenresolveLaunchCommandreportsviaShell, mirroring the headless path's BatBadBut (CVE-2024-27980) guard. No trading / auth / broker-credential / migration changes.🤖 Generated with Claude Code