chat: rename claude_sessions → general_chat_sessions; drop dead chat_sessions
The default /chat working directory is used by both the Claude and OpenCode harnesses now, so its Claude-specific name was misleading. - Rename the dir + accessors: getClaudeSessionsCwd → getGeneralChatSessionsCwd, ensureClaudeSessionsCwd → ensureGeneralChatSessionsCwd, path segment claude_sessions → general_chat_sessions (data-path on disk + code + UI labels/comments). No history migration — the old Claude transcript slug is orphaned (intentionally). - Remove the vestigial chat_sessions dir (leftover from the retired session store): it only ever held empty claude/archived/ dirs, recreated by a signin hook. Drop that hook (+ its dead imports) and the 4 unused data-path accessors (getUserSessionsDir, getClaudeDir, getSessionDir, getArchivedSessionDir), and delete the dir. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -55,14 +55,7 @@ export async function spawnClaude(params: ClaudeSpawnParams): Promise<ClaudeCode
|
||||
|
||||
const existingSession = getClaudeSession(sessionKey);
|
||||
|
||||
const claudeArgs = [
|
||||
CLAUDE_BIN,
|
||||
'-p',
|
||||
prompt,
|
||||
'--dangerously-skip-permissions',
|
||||
'--output-format',
|
||||
'json',
|
||||
];
|
||||
const claudeArgs = [CLAUDE_BIN, '-p', prompt, '--dangerously-skip-permissions', '--output-format', 'json'];
|
||||
|
||||
const isSuperAdmin = params.role === 'Super Admin';
|
||||
const mcpConfig = isSuperAdmin ? mcpHostPath : mcpSandboxPath;
|
||||
@@ -76,7 +69,7 @@ export async function spawnClaude(params: ClaudeSpawnParams): Promise<ClaudeCode
|
||||
}
|
||||
|
||||
const spawnCmd = isSuperAdmin ? claudeArgs : [...buildSandboxArgs(email), ...claudeArgs];
|
||||
// Honor a caller-provided working directory (e.g. /chat runs from a dedicated claude_sessions dir);
|
||||
// Honor a caller-provided working directory (e.g. /chat runs from a dedicated general_chat_sessions dir);
|
||||
// fall back to the host home for Super Admin, or the sandbox default otherwise.
|
||||
const spawnCwd = isSuperAdmin ? (params.cwd ?? HOST_HOME) : undefined;
|
||||
|
||||
@@ -179,7 +172,7 @@ export async function spawnClaudeStreaming(
|
||||
}
|
||||
|
||||
const spawnCmd = isSuperAdmin ? claudeArgs : [...buildSandboxArgs(email), ...claudeArgs];
|
||||
// Honor a caller-provided working directory (e.g. /chat runs from a dedicated claude_sessions dir);
|
||||
// Honor a caller-provided working directory (e.g. /chat runs from a dedicated general_chat_sessions dir);
|
||||
// fall back to the host home for Super Admin, or the sandbox default otherwise.
|
||||
const spawnCwd = isSuperAdmin ? (params.cwd ?? HOST_HOME) : undefined;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user