PluginProbe
Extendify / 3.1.5
Extendify v3.1.5
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
extendify / src / Agent / state / status.js

status.js in Extendify 3.1.5, at src/Agent/state/status.js

19 lines 700 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import { makeId } from '@agent/lib/util';
2 import { create } from 'zustand';
3
4 // Progress statuses live outside the message chain so they're never persisted
5 // or sent to the AI; the chat store clears them on every real message.
6 export const useStatusStore = create((set, get) => ({
7 statuses: [],
8 // Never cleared — navigation replaces the page.
9 leavingPage: false,
10 setLeavingPage: (leavingPage) => set({ leavingPage }),
11 pushStatus: (type, label) =>
12 set((state) => ({
13 statuses: [...state.statuses, { id: makeId(), type, label }],
14 })),
15 clearStatuses: () =>
16 set((state) => (state.statuses.length ? { statuses: [] } : state)),
17 getLatestStatus: () => get().statuses.at(-1) ?? null,
18 }));
19