feat(background-task): rendu live des tâches de fond — subscriber UI + canal IPC (#58)
Câble un canal attachable au flux de sortie d'une tâche de fond (runner infrastructure + commande app-tauri + port/adaptateurs frontend) et le panneau ProjectWorkStatePanel s'y abonne pour un rendu live au lieu d'un état figé au dernier snapshot. Validations obtenues avant commit : - cargo test -p infrastructure --test background_task_runner : vert - cargo check -p backend -p app-tauri : vert - npx vitest run src/features/workstate/workstate.test.tsx : vert - npm run typecheck : vert - verdict QA #58 : vert Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@ -71,8 +71,10 @@ import type {
|
||||
SkillGateway,
|
||||
TemplateGateway,
|
||||
WorkStateGateway,
|
||||
BackgroundTaskAttachment,
|
||||
} from "@/ports";
|
||||
import { normalizeProjectWorkState } from "../workStateNormalization";
|
||||
import { unsupportedOnWeb } from "./unsupported";
|
||||
import { normalizeTurnPage } from "../conversationNormalization";
|
||||
import { normalizeProfileModelCatalog } from "../profileCatalog";
|
||||
import type { HttpInvoker } from "./httpInvoker";
|
||||
@ -443,6 +445,12 @@ export class HttpWorkStateGateway implements WorkStateGateway {
|
||||
const state = await this.http.invoke<unknown>("get_project_work_state", { projectId });
|
||||
return normalizeProjectWorkState(state);
|
||||
}
|
||||
async attachBackgroundTask(
|
||||
_taskId: string,
|
||||
_onData: (bytes: Uint8Array) => void,
|
||||
): Promise<BackgroundTaskAttachment> {
|
||||
return unsupportedOnWeb("Attaching to a background task live stream");
|
||||
}
|
||||
async cancelBackgroundTask(taskId: string): Promise<void> {
|
||||
await this.http.invoke<unknown>("cancel_background_task", { taskId });
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user