feat: ClawTap v0.2.0
Interactive Prompts: - Unified InteractivePrompt type across all 3 adapters (Claude/Codex/Gemini) - InteractivePromptOverlay component with options, text input, countdown - Gemini + Codex pane monitors detect tool confirmation, ask user, plan approval - respondInteractivePrompt routing: permission → respondPermission, options → _selectOption - Claude AskUserQuestion nested questions[0] structure parsing Cross-AI Review: - Client-generated reviewId, removed pendingReview state - FloatingReviewPanel uses CSS display:none instead of unmount (keeps hooks alive) - Child review sessions default to YOLO/bypass permission mode - Send back to parent, send to existing/new review, tab switching, end review - Collapsed review cards with read-only panel for ended reviews - Full reconnect support: active + ended reviews restore correctly AskUserQuestion Tool Card UI: - Dedicated renderer replaces raw JSON display - Options shown with selected (green) / unselected (gray) indicators - Free text answers shown in quoted format with green border - Collapsed summary: question → answer - Shared parseAskQuestionInput utility (client + server) - Historical tool results attached via _result on tool_use blocks Adapter Fixes: - Session→adapter mapping persisted in SQLite (survives server restart) - SESSION_CREATED deferred for pendingRekey adapters (Codex/Gemini) - session-rekeyed handler sends complete SESSION_CREATED with adapter + cwd - Gemini: auto-accept folder trust, privacy notice, IDE nudge, YOLO * prompt - Claude: auto-accept bypass permissions confirmation (v2.1.85+) - Port fallback (EADDRINUSE → try +1), statusLine shell script wrapper Other: - Desktop Enter sends / Shift+Enter newline; Mobile Enter newline - Strip CLAWTAP_REF marker from session list - Active sessions tab shows adapter badge - Rename CLAUDE_UI_PASSWORD → CLAWTAP_PASSWORD Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -61,6 +61,11 @@ export function initDB(config: AppConfig): void {
|
||||
);
|
||||
CREATE INDEX IF NOT EXISTS idx_reviews_parent ON session_reviews(parent_cli_session_id);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS session_adapters (
|
||||
session_id TEXT PRIMARY KEY,
|
||||
adapter TEXT NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS saved_instructions (
|
||||
id TEXT PRIMARY KEY,
|
||||
label TEXT NOT NULL,
|
||||
@@ -122,6 +127,8 @@ interface PreparedStatements {
|
||||
instructionCreate: BetterSqlite3.Statement;
|
||||
instructionGetAll: BetterSqlite3.Statement;
|
||||
instructionDelete: BetterSqlite3.Statement;
|
||||
sessionAdapterSet: BetterSqlite3.Statement;
|
||||
sessionAdapterGet: BetterSqlite3.Statement;
|
||||
}
|
||||
|
||||
let _stmts: PreparedStatements | null = null;
|
||||
@@ -202,6 +209,12 @@ function stmts(): PreparedStatements {
|
||||
instructionDelete: d.prepare(
|
||||
`DELETE FROM saved_instructions WHERE id = ?`
|
||||
),
|
||||
sessionAdapterSet: d.prepare(
|
||||
`INSERT OR REPLACE INTO session_adapters (session_id, adapter) VALUES (?, ?)`
|
||||
),
|
||||
sessionAdapterGet: d.prepare(
|
||||
`SELECT adapter FROM session_adapters WHERE session_id = ?`
|
||||
),
|
||||
};
|
||||
}
|
||||
return _stmts;
|
||||
@@ -284,6 +297,18 @@ export const preferences = {
|
||||
|
||||
// --- Session Review Operations ---
|
||||
|
||||
// --- Session → Adapter Mapping (persists across restarts) ---
|
||||
|
||||
export const sessionAdapters = {
|
||||
set(sessionId: string, adapter: string): void {
|
||||
stmts().sessionAdapterSet.run(sessionId, adapter);
|
||||
},
|
||||
get(sessionId: string): string | null {
|
||||
const row = stmts().sessionAdapterGet.get(sessionId) as { adapter: string } | undefined;
|
||||
return row?.adapter ?? null;
|
||||
},
|
||||
};
|
||||
|
||||
let _childIdCache: Set<string> | null = null;
|
||||
|
||||
export const sessionReviews = {
|
||||
|
||||
Reference in New Issue
Block a user