improve ai alert copilot ux
This commit is contained in:
parent
ebdc4ab8e6
commit
32e965d782
15 changed files with 931 additions and 15 deletions
|
|
@ -25,6 +25,7 @@ type DesktopAiBridge = {
|
|||
next: Partial<{ model: string | null; reasoningEffort: IslandflowAiReasoningEffort | null }>
|
||||
) => Promise<void>;
|
||||
runTask: (request: IslandflowAiTaskRequest) => Promise<{ taskId: string }>;
|
||||
cancelTask: (taskId: string) => Promise<void>;
|
||||
subscribe: (listener: (state: IslandflowAiState) => void) => () => void;
|
||||
};
|
||||
};
|
||||
|
|
@ -53,6 +54,7 @@ type DesktopAiContextValue = {
|
|||
next: Partial<{ model: string | null; reasoningEffort: IslandflowAiReasoningEffort | null }>
|
||||
) => Promise<void>;
|
||||
runTask: (request: IslandflowAiTaskRequest) => Promise<{ taskId: string }>;
|
||||
cancelTask: (taskId: string) => Promise<void>;
|
||||
};
|
||||
|
||||
const BRIDGE_POLL_INTERVAL_MS = 250;
|
||||
|
|
@ -261,7 +263,8 @@ export function DesktopAiProvider({ children }: { children: ReactNode }) {
|
|||
cancelLogin: bridge?.ai.cancelLogin ?? rejectDesktopOnly,
|
||||
logout: bridge?.ai.logout ?? rejectDesktopOnly,
|
||||
updatePreferences: bridge?.ai.updatePreferences ?? rejectDesktopOnly,
|
||||
runTask: bridge?.ai.runTask ?? rejectDesktopOnly
|
||||
runTask: bridge?.ai.runTask ?? rejectDesktopOnly,
|
||||
cancelTask: bridge?.ai.cancelTask ?? rejectDesktopOnly
|
||||
}),
|
||||
[bridge, shellAvailable, state]
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue