mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
feat: Add CLI session pause and resume functionality with UI integration
This commit is contained in:
@@ -6150,6 +6150,7 @@ export interface CliSession {
|
||||
resumeKey?: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
isPaused: boolean;
|
||||
}
|
||||
|
||||
export interface CreateCliSessionInput {
|
||||
@@ -6242,6 +6243,20 @@ export async function closeCliSession(sessionKey: string, projectPath?: string):
|
||||
});
|
||||
}
|
||||
|
||||
export async function pauseCliSession(sessionKey: string, projectPath?: string): Promise<{ success: boolean }> {
|
||||
return fetchApi<{ success: boolean }>(withPath(`/api/cli-sessions/${encodeURIComponent(sessionKey)}/pause`, projectPath), {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
}
|
||||
|
||||
export async function resumeCliSession(sessionKey: string, projectPath?: string): Promise<{ success: boolean }> {
|
||||
return fetchApi<{ success: boolean }>(withPath(`/api/cli-sessions/${encodeURIComponent(sessionKey)}/resume`, projectPath), {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({}),
|
||||
});
|
||||
}
|
||||
|
||||
export async function createCliSessionShareToken(
|
||||
sessionKey: string,
|
||||
input: { mode?: 'read' | 'write'; ttlMs?: number },
|
||||
|
||||
Reference in New Issue
Block a user