coder(pending): new-file-from-RightRail create endpoint + modal
POST /api/sessions/:sessionId/pending/create queues a pending_changes create via queueCreate (WriteGuardError -> 422 with the guard message). RightRail gains a 'New file from pasted text' modal (path + content) wired through api.coder.createPendingFile; sessionId is threaded down from App.tsx. The staged change shows in the CoderPane DiffPanel for explicit apply. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -346,6 +346,23 @@ export const api = {
|
||||
user_message: userMessage,
|
||||
}),
|
||||
}),
|
||||
// Queue a new-file create from the RightRail browser → BooCoder
|
||||
// pending_changes (operation='create'). Surfaces in the CoderPane DiffPanel
|
||||
// for explicit apply. A WriteGuardError comes back as a 422 whose { error }
|
||||
// body ApiError exposes as .message for inline display.
|
||||
createPendingFile: (sessionId: string, file_path: string, content: string) =>
|
||||
request<{
|
||||
id: string;
|
||||
session_id: string;
|
||||
task_id: string | null;
|
||||
file_path: string;
|
||||
operation: string;
|
||||
status: string;
|
||||
created_at: string;
|
||||
}>(`/api/coder/sessions/${sessionId}/pending/create`, {
|
||||
method: 'POST',
|
||||
body: JSON.stringify({ file_path, content }),
|
||||
}),
|
||||
},
|
||||
|
||||
agents: {
|
||||
|
||||
Reference in New Issue
Block a user