@ai-matrx/chat 0.3.23 → 0.3.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +19 -0
- package/dist/agents/components/chat/ChatConversationSurface.js +2 -2
- package/dist/agents/components/chat/ChatRunHeader.js +3 -5
- package/dist/agents/components/chat/PinnedAgentsSection.js +2 -2
- package/dist/agents/components/context-preview/ContextCompareView.js +5 -12
- package/dist/agents/components/inputs/smart-input/composer/useComposerAgent.js +4 -5
- package/dist/agents/components/run/AgentRunnerPage.js +3 -3
- package/dist/agents/hooks/useAgentModelLabel.js +6 -2
- package/dist/agents/hooks/useAgentRunSurfaceScope.js +3 -4
- package/dist/agents/identity/agent-catalog-lists.d.ts +45 -0
- package/dist/agents/identity/agent-catalog-lists.js +128 -0
- package/dist/agents/identity/agent-identity.d.ts +52 -0
- package/dist/agents/identity/agent-identity.js +144 -0
- package/dist/agents/identity/run-tier-store.d.ts +15 -0
- package/dist/agents/identity/run-tier-store.js +23 -0
- package/dist/agents/redux/agent-definition/converters.js +1 -1
- package/dist/agents/redux/agent-definition/selectors.d.ts +612 -4581
- package/dist/agents/redux/agent-definition/selectors.js +6 -129
- package/dist/agents/redux/agent-definition/slice.d.ts +1 -0
- package/dist/agents/redux/agent-definition/slice.js +1 -0
- package/dist/agents/redux/agent-definition/thunks.d.ts +9 -205
- package/dist/agents/redux/agent-definition/thunks.js +34 -237
- package/dist/agents/redux/agent-filter/selectors.d.ts +10 -402
- package/dist/agents/redux/agent-filter/selectors.js +23 -45
- package/dist/agents/redux/agent-filter/useAgentIdsForFilter.d.ts +6 -0
- package/dist/agents/redux/agent-filter/useAgentIdsForFilter.js +14 -0
- package/dist/agents/redux/conversation-history/selectors.js +2 -3
- package/dist/agents/redux/execution-system/thunks/launch-agent-execution.thunk.js +2 -2
- package/dist/agents/redux/execution-system/thunks/load-conversation.thunk.js +2 -2
- package/dist/agents/redux/execution-system/thunks/run-headless-agent-json.js +2 -2
- package/dist/agents/redux/execution-system/utils/output-contract-guard.js +2 -1
- package/dist/agents/types/agent-definition.types.d.ts +8 -26
- package/dist/cx-chat/components/ChatMobileAgentName.js +4 -7
- package/dist/cx-chat/components/ChatSidebarClient.js +2 -2
- package/dist/cx-chat/components/agent/AgentPickerSheet.js +10 -11
- package/dist/cx-chat/hooks/useChatCatalogueInit.js +4 -7
- package/dist/cx-chat/hooks/useInstanceBootstrap.js +4 -5
- package/dist/host/db-types.d.ts +122 -0
- package/dist/window-panels/windows/agents/AgentRunWindow.js +4 -6
- package/dist/window-panels/windows/agents/RunControlsWindow.js +2 -4
- package/package.json +9 -8
- package/dist/agents/route/AgentListHydrator.d.ts +0 -4
- package/dist/agents/route/AgentListHydrator.js +0 -49
|
@@ -1,412 +1,20 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Resolves a `CodeAgentFilter` (stored in user preferences) into a concrete
|
|
3
|
-
* list of `
|
|
3
|
+
* list of agents (pure; `useAgentIdsForFilter` binds it to the ONE agent catalog). Generic enough to drive any UI that
|
|
4
4
|
* wants to narrow the agent roster — the /code workspace's Chat + History
|
|
5
5
|
* slots are the first consumers; future surfaces (agent-app chat, task
|
|
6
6
|
* canvas, etc.) can reuse this without duplicating logic.
|
|
7
7
|
*/
|
|
8
|
-
import type { ChatRootState } from "../../../store/root-state.js";
|
|
9
8
|
import type { CodeAgentFilter } from "../../../host/prefs.js";
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
export declare const makeSelectAgentsForFilter: () => ((state: {
|
|
21
|
-
voiceAgent: import("../../../voice-agent/types.js").VoiceAgentState;
|
|
22
|
-
agentDefinition: import("../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
23
|
-
conversationList: import("../conversation-list/conversation-list.types.js").ConversationListState;
|
|
24
|
-
conversationHistory: import("../conversation-history/index.js").ConversationHistoryState;
|
|
25
|
-
agentShortcut: import("../agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
26
|
-
agentShortcutCategory: import("../agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
27
|
-
surfaceUserState: import("../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
28
|
-
tools: import("../tools/tools.slice.js").ToolsSliceState;
|
|
29
|
-
conversations: import("../execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
30
|
-
chatIncognito: import("../chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
31
|
-
chatRoute: import("../chat/chat-route.slice.js").ChatRouteState;
|
|
32
|
-
instanceModelOverrides: import("../execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
33
|
-
instanceInputCapabilities: import("../execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
34
|
-
instanceVariableValues: import("../execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
35
|
-
instanceResources: import("../execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
36
|
-
instanceContext: import("../execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
37
|
-
instanceWorkingDocument: import("../execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
38
|
-
instanceUserInput: import("../execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
39
|
-
instanceClientTools: import("../execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
40
|
-
pendingAsks: import("../../ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
41
|
-
conversationInbox: import("../execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
42
|
-
agentLists: import("../../ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
43
|
-
instanceUIState: import("../execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
44
|
-
activeTools: import("../execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
45
|
-
activeRequests: import("../execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
46
|
-
runSets: import("../execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
47
|
-
messages: import("../execution-system/messages/messages.slice.js").MessagesState;
|
|
48
|
-
observability: import("../execution-system/observability/observability.slice.js").ObservabilityState;
|
|
49
|
-
contextState: import("../execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
50
|
-
observationalMemory: import("../execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
51
|
-
cacheBypass: import("../execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
52
|
-
conversationFocus: import("../execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
53
|
-
surfaces: import("../surfaces/surfaces.slice.js").SurfacesState;
|
|
54
|
-
surfacesCatalog: import("../../../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
55
|
-
agentSurfaceBindings: import("../../../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
56
|
-
surfaceConfig: import("../../../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
57
|
-
agentAssistantMarkdownDraft: import("../agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
58
|
-
mcp: import("../mcp/mcp.slice.js").McpSliceState;
|
|
59
|
-
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
60
|
-
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
61
|
-
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
62
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
63
|
-
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
64
|
-
} & import("../../../store/root-state.js").ChatHostReadSlices, filter: CodeAgentFilter | null | undefined) => AgentDefinitionRecord[]) & {
|
|
65
|
-
clearCache: () => void;
|
|
66
|
-
resultsCount: () => number;
|
|
67
|
-
resetResultsCount: () => void;
|
|
68
|
-
} & {
|
|
69
|
-
resultFunc: (resultFuncArgs_0: AgentDefinitionRecord[], resultFuncArgs_1: CodeAgentFilter | null | undefined) => AgentDefinitionRecord[];
|
|
70
|
-
memoizedResultFunc: ((resultFuncArgs_0: AgentDefinitionRecord[], resultFuncArgs_1: CodeAgentFilter | null | undefined) => AgentDefinitionRecord[]) & {
|
|
71
|
-
clearCache: () => void;
|
|
72
|
-
resultsCount: () => number;
|
|
73
|
-
resetResultsCount: () => void;
|
|
74
|
-
};
|
|
75
|
-
lastResult: () => AgentDefinitionRecord[];
|
|
76
|
-
dependencies: [((state: {
|
|
77
|
-
voiceAgent: import("../../../voice-agent/types.js").VoiceAgentState;
|
|
78
|
-
agentDefinition: import("../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
79
|
-
conversationList: import("../conversation-list/conversation-list.types.js").ConversationListState;
|
|
80
|
-
conversationHistory: import("../conversation-history/index.js").ConversationHistoryState;
|
|
81
|
-
agentShortcut: import("../agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
82
|
-
agentShortcutCategory: import("../agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
83
|
-
surfaceUserState: import("../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
84
|
-
tools: import("../tools/tools.slice.js").ToolsSliceState;
|
|
85
|
-
conversations: import("../execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
86
|
-
chatIncognito: import("../chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
87
|
-
chatRoute: import("../chat/chat-route.slice.js").ChatRouteState;
|
|
88
|
-
instanceModelOverrides: import("../execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
89
|
-
instanceInputCapabilities: import("../execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
90
|
-
instanceVariableValues: import("../execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
91
|
-
instanceResources: import("../execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
92
|
-
instanceContext: import("../execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
93
|
-
instanceWorkingDocument: import("../execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
94
|
-
instanceUserInput: import("../execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
95
|
-
instanceClientTools: import("../execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
96
|
-
pendingAsks: import("../../ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
97
|
-
conversationInbox: import("../execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
98
|
-
agentLists: import("../../ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
99
|
-
instanceUIState: import("../execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
100
|
-
activeTools: import("../execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
101
|
-
activeRequests: import("../execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
102
|
-
runSets: import("../execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
103
|
-
messages: import("../execution-system/messages/messages.slice.js").MessagesState;
|
|
104
|
-
observability: import("../execution-system/observability/observability.slice.js").ObservabilityState;
|
|
105
|
-
contextState: import("../execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
106
|
-
observationalMemory: import("../execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
107
|
-
cacheBypass: import("../execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
108
|
-
conversationFocus: import("../execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
109
|
-
surfaces: import("../surfaces/surfaces.slice.js").SurfacesState;
|
|
110
|
-
surfacesCatalog: import("../../../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
111
|
-
agentSurfaceBindings: import("../../../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
112
|
-
surfaceConfig: import("../../../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
113
|
-
agentAssistantMarkdownDraft: import("../agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
114
|
-
mcp: import("../mcp/mcp.slice.js").McpSliceState;
|
|
115
|
-
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
116
|
-
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
117
|
-
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
118
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
119
|
-
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
120
|
-
} & import("../../../store/root-state.js").ChatHostReadSlices) => AgentDefinitionRecord[]) & {
|
|
121
|
-
clearCache: () => void;
|
|
122
|
-
resultsCount: () => number;
|
|
123
|
-
resetResultsCount: () => void;
|
|
124
|
-
} & {
|
|
125
|
-
resultFunc: (resultFuncArgs_0: AgentDefinitionRecord[]) => AgentDefinitionRecord[];
|
|
126
|
-
memoizedResultFunc: ((resultFuncArgs_0: AgentDefinitionRecord[]) => AgentDefinitionRecord[]) & {
|
|
127
|
-
clearCache: () => void;
|
|
128
|
-
resultsCount: () => number;
|
|
129
|
-
resetResultsCount: () => void;
|
|
130
|
-
};
|
|
131
|
-
lastResult: () => AgentDefinitionRecord[];
|
|
132
|
-
dependencies: [((state: {
|
|
133
|
-
voiceAgent: import("../../../voice-agent/types.js").VoiceAgentState;
|
|
134
|
-
agentDefinition: import("../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
135
|
-
conversationList: import("../conversation-list/conversation-list.types.js").ConversationListState;
|
|
136
|
-
conversationHistory: import("../conversation-history/index.js").ConversationHistoryState;
|
|
137
|
-
agentShortcut: import("../agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
138
|
-
agentShortcutCategory: import("../agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
139
|
-
surfaceUserState: import("../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
140
|
-
tools: import("../tools/tools.slice.js").ToolsSliceState;
|
|
141
|
-
conversations: import("../execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
142
|
-
chatIncognito: import("../chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
143
|
-
chatRoute: import("../chat/chat-route.slice.js").ChatRouteState;
|
|
144
|
-
instanceModelOverrides: import("../execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
145
|
-
instanceInputCapabilities: import("../execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
146
|
-
instanceVariableValues: import("../execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
147
|
-
instanceResources: import("../execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
148
|
-
instanceContext: import("../execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
149
|
-
instanceWorkingDocument: import("../execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
150
|
-
instanceUserInput: import("../execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
151
|
-
instanceClientTools: import("../execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
152
|
-
pendingAsks: import("../../ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
153
|
-
conversationInbox: import("../execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
154
|
-
agentLists: import("../../ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
155
|
-
instanceUIState: import("../execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
156
|
-
activeTools: import("../execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
157
|
-
activeRequests: import("../execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
158
|
-
runSets: import("../execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
159
|
-
messages: import("../execution-system/messages/messages.slice.js").MessagesState;
|
|
160
|
-
observability: import("../execution-system/observability/observability.slice.js").ObservabilityState;
|
|
161
|
-
contextState: import("../execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
162
|
-
observationalMemory: import("../execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
163
|
-
cacheBypass: import("../execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
164
|
-
conversationFocus: import("../execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
165
|
-
surfaces: import("../surfaces/surfaces.slice.js").SurfacesState;
|
|
166
|
-
surfacesCatalog: import("../../../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
167
|
-
agentSurfaceBindings: import("../../../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
168
|
-
surfaceConfig: import("../../../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
169
|
-
agentAssistantMarkdownDraft: import("../agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
170
|
-
mcp: import("../mcp/mcp.slice.js").McpSliceState;
|
|
171
|
-
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
172
|
-
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
173
|
-
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
174
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
175
|
-
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
176
|
-
} & import("../../../store/root-state.js").ChatHostReadSlices) => AgentDefinitionRecord[]) & {
|
|
177
|
-
clearCache: () => void;
|
|
178
|
-
resultsCount: () => number;
|
|
179
|
-
resetResultsCount: () => void;
|
|
180
|
-
} & {
|
|
181
|
-
resultFunc: (resultFuncArgs_0: AgentDefinitionRecord[]) => AgentDefinitionRecord[];
|
|
182
|
-
memoizedResultFunc: ((resultFuncArgs_0: AgentDefinitionRecord[]) => AgentDefinitionRecord[]) & {
|
|
183
|
-
clearCache: () => void;
|
|
184
|
-
resultsCount: () => number;
|
|
185
|
-
resetResultsCount: () => void;
|
|
186
|
-
};
|
|
187
|
-
lastResult: () => AgentDefinitionRecord[];
|
|
188
|
-
dependencies: [((state: {
|
|
189
|
-
voiceAgent: import("../../../voice-agent/types.js").VoiceAgentState;
|
|
190
|
-
agentDefinition: import("../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
191
|
-
conversationList: import("../conversation-list/conversation-list.types.js").ConversationListState;
|
|
192
|
-
conversationHistory: import("../conversation-history/index.js").ConversationHistoryState;
|
|
193
|
-
agentShortcut: import("../agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
194
|
-
agentShortcutCategory: import("../agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
195
|
-
surfaceUserState: import("../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
196
|
-
tools: import("../tools/tools.slice.js").ToolsSliceState;
|
|
197
|
-
conversations: import("../execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
198
|
-
chatIncognito: import("../chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
199
|
-
chatRoute: import("../chat/chat-route.slice.js").ChatRouteState;
|
|
200
|
-
instanceModelOverrides: import("../execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
201
|
-
instanceInputCapabilities: import("../execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
202
|
-
instanceVariableValues: import("../execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
203
|
-
instanceResources: import("../execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
204
|
-
instanceContext: import("../execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
205
|
-
instanceWorkingDocument: import("../execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
206
|
-
instanceUserInput: import("../execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
207
|
-
instanceClientTools: import("../execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
208
|
-
pendingAsks: import("../../ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
209
|
-
conversationInbox: import("../execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
210
|
-
agentLists: import("../../ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
211
|
-
instanceUIState: import("../execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
212
|
-
activeTools: import("../execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
213
|
-
activeRequests: import("../execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
214
|
-
runSets: import("../execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
215
|
-
messages: import("../execution-system/messages/messages.slice.js").MessagesState;
|
|
216
|
-
observability: import("../execution-system/observability/observability.slice.js").ObservabilityState;
|
|
217
|
-
contextState: import("../execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
218
|
-
observationalMemory: import("../execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
219
|
-
cacheBypass: import("../execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
220
|
-
conversationFocus: import("../execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
221
|
-
surfaces: import("../surfaces/surfaces.slice.js").SurfacesState;
|
|
222
|
-
surfacesCatalog: import("../../../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
223
|
-
agentSurfaceBindings: import("../../../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
224
|
-
surfaceConfig: import("../../../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
225
|
-
agentAssistantMarkdownDraft: import("../agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
226
|
-
mcp: import("../mcp/mcp.slice.js").McpSliceState;
|
|
227
|
-
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
228
|
-
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
229
|
-
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
230
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
231
|
-
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
232
|
-
} & import("../../../store/root-state.js").ChatHostReadSlices) => AgentDefinitionRecord[]) & {
|
|
233
|
-
clearCache: () => void;
|
|
234
|
-
resultsCount: () => number;
|
|
235
|
-
resetResultsCount: () => void;
|
|
236
|
-
} & {
|
|
237
|
-
resultFunc: (resultFuncArgs_0: Record<string, AgentDefinitionRecord>) => AgentDefinitionRecord[];
|
|
238
|
-
memoizedResultFunc: ((resultFuncArgs_0: Record<string, AgentDefinitionRecord>) => AgentDefinitionRecord[]) & {
|
|
239
|
-
clearCache: () => void;
|
|
240
|
-
resultsCount: () => number;
|
|
241
|
-
resetResultsCount: () => void;
|
|
242
|
-
};
|
|
243
|
-
lastResult: () => AgentDefinitionRecord[];
|
|
244
|
-
dependencies: [((state: {
|
|
245
|
-
voiceAgent: import("../../../voice-agent/types.js").VoiceAgentState;
|
|
246
|
-
agentDefinition: import("../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
247
|
-
conversationList: import("../conversation-list/conversation-list.types.js").ConversationListState;
|
|
248
|
-
conversationHistory: import("../conversation-history/index.js").ConversationHistoryState;
|
|
249
|
-
agentShortcut: import("../agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
250
|
-
agentShortcutCategory: import("../agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
251
|
-
surfaceUserState: import("../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
252
|
-
tools: import("../tools/tools.slice.js").ToolsSliceState;
|
|
253
|
-
conversations: import("../execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
254
|
-
chatIncognito: import("../chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
255
|
-
chatRoute: import("../chat/chat-route.slice.js").ChatRouteState;
|
|
256
|
-
instanceModelOverrides: import("../execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
257
|
-
instanceInputCapabilities: import("../execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
258
|
-
instanceVariableValues: import("../execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
259
|
-
instanceResources: import("../execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
260
|
-
instanceContext: import("../execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
261
|
-
instanceWorkingDocument: import("../execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
262
|
-
instanceUserInput: import("../execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
263
|
-
instanceClientTools: import("../execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
264
|
-
pendingAsks: import("../../ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
265
|
-
conversationInbox: import("../execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
266
|
-
agentLists: import("../../ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
267
|
-
instanceUIState: import("../execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
268
|
-
activeTools: import("../execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
269
|
-
activeRequests: import("../execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
270
|
-
runSets: import("../execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
271
|
-
messages: import("../execution-system/messages/messages.slice.js").MessagesState;
|
|
272
|
-
observability: import("../execution-system/observability/observability.slice.js").ObservabilityState;
|
|
273
|
-
contextState: import("../execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
274
|
-
observationalMemory: import("../execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
275
|
-
cacheBypass: import("../execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
276
|
-
conversationFocus: import("../execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
277
|
-
surfaces: import("../surfaces/surfaces.slice.js").SurfacesState;
|
|
278
|
-
surfacesCatalog: import("../../../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
279
|
-
agentSurfaceBindings: import("../../../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
280
|
-
surfaceConfig: import("../../../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
281
|
-
agentAssistantMarkdownDraft: import("../agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
282
|
-
mcp: import("../mcp/mcp.slice.js").McpSliceState;
|
|
283
|
-
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
284
|
-
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
285
|
-
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
286
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
287
|
-
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
288
|
-
} & import("../../../store/root-state.js").ChatHostReadSlices) => Record<string, AgentDefinitionRecord>) & {
|
|
289
|
-
clearCache: () => void;
|
|
290
|
-
resultsCount: () => number;
|
|
291
|
-
resetResultsCount: () => void;
|
|
292
|
-
} & {
|
|
293
|
-
resultFunc: (resultFuncArgs_0: import("../../types/agent-definition.types.js").AgentDefinitionSliceState) => Record<string, AgentDefinitionRecord>;
|
|
294
|
-
memoizedResultFunc: ((resultFuncArgs_0: import("../../types/agent-definition.types.js").AgentDefinitionSliceState) => Record<string, AgentDefinitionRecord>) & {
|
|
295
|
-
clearCache: () => void;
|
|
296
|
-
resultsCount: () => number;
|
|
297
|
-
resetResultsCount: () => void;
|
|
298
|
-
};
|
|
299
|
-
lastResult: () => Record<string, AgentDefinitionRecord>;
|
|
300
|
-
dependencies: [(state: ChatRootState) => import("../../types/agent-definition.types.js").AgentDefinitionSliceState];
|
|
301
|
-
recomputations: () => number;
|
|
302
|
-
resetRecomputations: () => void;
|
|
303
|
-
dependencyRecomputations: () => number;
|
|
304
|
-
resetDependencyRecomputations: () => void;
|
|
305
|
-
} & {
|
|
306
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
307
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
308
|
-
}];
|
|
309
|
-
recomputations: () => number;
|
|
310
|
-
resetRecomputations: () => void;
|
|
311
|
-
dependencyRecomputations: () => number;
|
|
312
|
-
resetDependencyRecomputations: () => void;
|
|
313
|
-
} & {
|
|
314
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
315
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
316
|
-
}];
|
|
317
|
-
recomputations: () => number;
|
|
318
|
-
resetRecomputations: () => void;
|
|
319
|
-
dependencyRecomputations: () => number;
|
|
320
|
-
resetDependencyRecomputations: () => void;
|
|
321
|
-
} & {
|
|
322
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
323
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
324
|
-
}];
|
|
325
|
-
recomputations: () => number;
|
|
326
|
-
resetRecomputations: () => void;
|
|
327
|
-
dependencyRecomputations: () => number;
|
|
328
|
-
resetDependencyRecomputations: () => void;
|
|
329
|
-
} & {
|
|
330
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
331
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
332
|
-
}, (_state: ChatRootState, filter: CodeAgentFilter | null | undefined) => CodeAgentFilter | null | undefined];
|
|
333
|
-
recomputations: () => number;
|
|
334
|
-
resetRecomputations: () => void;
|
|
335
|
-
dependencyRecomputations: () => number;
|
|
336
|
-
resetDependencyRecomputations: () => void;
|
|
337
|
-
} & {
|
|
338
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
339
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
340
|
-
};
|
|
341
|
-
/**
|
|
342
|
-
* Convenience shorthand: returns just the ids that match the filter. Useful
|
|
343
|
-
* for passing into `ConversationHistorySidebar`'s `agentIds` prop.
|
|
344
|
-
*/
|
|
345
|
-
export declare const makeSelectAgentIdsForFilter: () => ((state: {
|
|
346
|
-
voiceAgent: import("../../../voice-agent/types.js").VoiceAgentState;
|
|
347
|
-
agentDefinition: import("../../types/agent-definition.types.js").AgentDefinitionSliceState;
|
|
348
|
-
conversationList: import("../conversation-list/conversation-list.types.js").ConversationListState;
|
|
349
|
-
conversationHistory: import("../conversation-history/index.js").ConversationHistoryState;
|
|
350
|
-
agentShortcut: import("../agent-shortcuts/types.js").AgentShortcutSliceState;
|
|
351
|
-
agentShortcutCategory: import("../agent-shortcut-categories/types.js").AgentShortcutCategorySliceState;
|
|
352
|
-
surfaceUserState: import("../../../surfaces/redux/userStateSlice.js").SurfaceUserStateSlice;
|
|
353
|
-
tools: import("../tools/tools.slice.js").ToolsSliceState;
|
|
354
|
-
conversations: import("../execution-system/conversations/conversations.slice.js").ConversationsState;
|
|
355
|
-
chatIncognito: import("../chat/chat-incognito.slice.js").ChatIncognitoState;
|
|
356
|
-
chatRoute: import("../chat/chat-route.slice.js").ChatRouteState;
|
|
357
|
-
instanceModelOverrides: import("../execution-system/instance-model-overrides/instance-model-overrides.slice.js").InstanceModelOverridesState;
|
|
358
|
-
instanceInputCapabilities: import("../execution-system/instance-input-capabilities/instance-input-capabilities.slice.js").InstanceInputCapabilitiesState;
|
|
359
|
-
instanceVariableValues: import("../execution-system/instance-variable-values/instance-variable-values.slice.js").InstanceVariableValuesState;
|
|
360
|
-
instanceResources: import("../execution-system/instance-resources/instance-resources.slice.js").InstanceResourcesState;
|
|
361
|
-
instanceContext: import("../execution-system/instance-context/instance-context.slice.js").InstanceContextState;
|
|
362
|
-
instanceWorkingDocument: import("../execution-system/instance-working-document/instance-working-document.slice.js").InstanceWorkingDocumentSliceState;
|
|
363
|
-
instanceUserInput: import("../execution-system/instance-user-input/instance-user-input.slice.js").InstanceUserInputSliceState;
|
|
364
|
-
instanceClientTools: import("../execution-system/instance-client-tools/instance-client-tools.slice.js").InstanceClientToolsState;
|
|
365
|
-
pendingAsks: import("../../ui-first-tools/redux/pending-asks.slice.js").PendingAsksState;
|
|
366
|
-
conversationInbox: import("../execution-system/inbox/inbox.slice.js").ConversationInboxState;
|
|
367
|
-
agentLists: import("../../ui-first-tools/redux/agent-lists.slice.js").AgentListsState;
|
|
368
|
-
instanceUIState: import("../execution-system/instance-ui-state/instance-ui-state.slice.js").InstanceUIStateSlice;
|
|
369
|
-
activeTools: import("../execution-system/active-tools/active-tools.slice.js").ActiveToolsState;
|
|
370
|
-
activeRequests: import("../execution-system/active-requests/active-requests.slice.js").ActiveRequestsState;
|
|
371
|
-
runSets: import("../execution-system/run-sets/run-sets.slice.js").RunSetsState;
|
|
372
|
-
messages: import("../execution-system/messages/messages.slice.js").MessagesState;
|
|
373
|
-
observability: import("../execution-system/observability/observability.slice.js").ObservabilityState;
|
|
374
|
-
contextState: import("../execution-system/context-state/context-state.slice.js").ContextStateSliceState;
|
|
375
|
-
observationalMemory: import("../execution-system/observational-memory/observational-memory.slice.js").ObservationalMemoryState;
|
|
376
|
-
cacheBypass: import("../execution-system/message-crud/cache-bypass.slice.js").CacheBypassState;
|
|
377
|
-
conversationFocus: import("../execution-system/conversation-focus/conversation-focus.slice.js").ConversationFocusState;
|
|
378
|
-
surfaces: import("../surfaces/surfaces.slice.js").SurfacesState;
|
|
379
|
-
surfacesCatalog: import("../../../surfaces/redux/surfacesCatalogSlice.js").SurfacesCatalogSliceState;
|
|
380
|
-
agentSurfaceBindings: import("../../../surfaces/redux/agentSurfaceBindingsSlice.js").AgentSurfaceBindingsSliceState;
|
|
381
|
-
surfaceConfig: import("../../../surfaces/redux/surfaceConfigSlice.js").SurfaceConfigSliceState;
|
|
382
|
-
agentAssistantMarkdownDraft: import("../agent-assistant-markdown-draft.slice.js").AgentAssistantMarkdownDraftState;
|
|
383
|
-
mcp: import("../mcp/mcp.slice.js").McpSliceState;
|
|
384
|
-
proposedDirectives: import("../proposed-directives/proposedDirectivesSlice.js").ProposedDirectivesState;
|
|
385
|
-
agentSettings: import("../agent-settings/types.js").AgentSettingsState;
|
|
386
|
-
conversationAttachments: import("../../connectors/attachments.slice.js").AttachmentsSliceState;
|
|
387
|
-
modelRegistry: import("../../model-registry/modelRegistrySlice.js").ModelRegistryState;
|
|
388
|
-
chatHost: import("../../../store/chat-host.slice.js").ChatHostState;
|
|
389
|
-
} & import("../../../store/root-state.js").ChatHostReadSlices, filter: CodeAgentFilter | null | undefined) => string[]) & {
|
|
390
|
-
clearCache: () => void;
|
|
391
|
-
resultsCount: () => number;
|
|
392
|
-
resetResultsCount: () => void;
|
|
393
|
-
} & {
|
|
394
|
-
resultFunc: (resultFuncArgs_0: AgentDefinitionRecord[], resultFuncArgs_1: CodeAgentFilter | null | undefined) => string[];
|
|
395
|
-
memoizedResultFunc: ((resultFuncArgs_0: AgentDefinitionRecord[], resultFuncArgs_1: CodeAgentFilter | null | undefined) => string[]) & {
|
|
396
|
-
clearCache: () => void;
|
|
397
|
-
resultsCount: () => number;
|
|
398
|
-
resetResultsCount: () => void;
|
|
399
|
-
};
|
|
400
|
-
lastResult: () => string[];
|
|
401
|
-
dependencies: [(state: ChatRootState, filter: CodeAgentFilter | null | undefined) => AgentDefinitionRecord[], (_state: ChatRootState, filter: CodeAgentFilter | null | undefined) => CodeAgentFilter | null | undefined];
|
|
402
|
-
recomputations: () => number;
|
|
403
|
-
resetRecomputations: () => void;
|
|
404
|
-
dependencyRecomputations: () => number;
|
|
405
|
-
resetDependencyRecomputations: () => void;
|
|
406
|
-
} & {
|
|
407
|
-
memoize: typeof import("reselect").weakMapMemoize;
|
|
408
|
-
argsMemoize: typeof import("reselect").weakMapMemoize;
|
|
409
|
-
};
|
|
9
|
+
/** The fields a filter reads — satisfied by a catalog `AgentSummary` and a registry record alike. */
|
|
10
|
+
export interface FilterableAgent {
|
|
11
|
+
id: string;
|
|
12
|
+
isFavorite: boolean;
|
|
13
|
+
tags?: string[] | null;
|
|
14
|
+
category?: string | null;
|
|
15
|
+
}
|
|
16
|
+
/** Pure: the agents matching a stored `CodeAgentFilter`. `null` / "all" returns the input. */
|
|
17
|
+
export declare function filterAgentsForFilter<T extends FilterableAgent>(agents: T[], filter: CodeAgentFilter | null | undefined): T[];
|
|
410
18
|
/**
|
|
411
19
|
* `ConversationHistorySidebar` uses an empty agent-id array as the canonical
|
|
412
20
|
* "all accessible conversations" sentinel. Never expand the All preference
|
|
@@ -1,48 +1,27 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const wanted = new Set(filter.categories);
|
|
21
|
-
return agents.filter((a) => a.category && wanted.has(a.category));
|
|
22
|
-
}
|
|
23
|
-
case "explicit": {
|
|
24
|
-
if (filter.agentIds.length === 0) return agents;
|
|
25
|
-
const wanted = new Set(filter.agentIds);
|
|
26
|
-
return agents.filter((a) => wanted.has(a.id));
|
|
27
|
-
}
|
|
28
|
-
default:
|
|
29
|
-
return agents;
|
|
1
|
+
function filterAgentsForFilter(agents, filter) {
|
|
2
|
+
if (!filter || filter.mode === "all") return agents;
|
|
3
|
+
switch (filter.mode) {
|
|
4
|
+
case "favorites":
|
|
5
|
+
return agents.filter((a) => a.isFavorite);
|
|
6
|
+
case "tags": {
|
|
7
|
+
if (filter.tags.length === 0) return agents;
|
|
8
|
+
const wanted = new Set(filter.tags);
|
|
9
|
+
return agents.filter((a) => a.tags?.some((t) => wanted.has(t)));
|
|
10
|
+
}
|
|
11
|
+
case "categories": {
|
|
12
|
+
if (filter.categories.length === 0) return agents;
|
|
13
|
+
const wanted = new Set(filter.categories);
|
|
14
|
+
return agents.filter((a) => a.category && wanted.has(a.category));
|
|
15
|
+
}
|
|
16
|
+
case "explicit": {
|
|
17
|
+
if (filter.agentIds.length === 0) return agents;
|
|
18
|
+
const wanted = new Set(filter.agentIds);
|
|
19
|
+
return agents.filter((a) => wanted.has(a.id));
|
|
30
20
|
}
|
|
21
|
+
default:
|
|
22
|
+
return agents;
|
|
31
23
|
}
|
|
32
|
-
|
|
33
|
-
const makeSelectAgentIdsForFilter = () => {
|
|
34
|
-
const selectAgents = makeSelectAgentsForFilter();
|
|
35
|
-
return createSelector(
|
|
36
|
-
[
|
|
37
|
-
(state, filter) => selectAgents(state, filter),
|
|
38
|
-
(_state, filter) => filter
|
|
39
|
-
],
|
|
40
|
-
(agents, filter) => conversationHistoryAgentIds(
|
|
41
|
-
filter,
|
|
42
|
-
agents.map((agent) => agent.id)
|
|
43
|
-
)
|
|
44
|
-
);
|
|
45
|
-
};
|
|
24
|
+
}
|
|
46
25
|
function conversationHistoryAgentIds(filter, matchingAgentIds) {
|
|
47
26
|
return !filter || filter.mode === "all" ? [] : matchingAgentIds;
|
|
48
27
|
}
|
|
@@ -80,6 +59,5 @@ export {
|
|
|
80
59
|
conversationHistoryAgentIds,
|
|
81
60
|
describeEmptyFilter,
|
|
82
61
|
describeFilter,
|
|
83
|
-
|
|
84
|
-
makeSelectAgentsForFilter
|
|
62
|
+
filterAgentsForFilter
|
|
85
63
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { CodeAgentFilter } from "../../../host/prefs.js";
|
|
2
|
+
/**
|
|
3
|
+
* The agent ids a stored `CodeAgentFilter` matches, over the ONE agent catalog (active, unarchived
|
|
4
|
+
* agents). "All" answers `[]` — the history sidebar's "every accessible conversation" sentinel.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAgentIdsForFilter(filter: CodeAgentFilter | null | undefined): string[];
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useMemo } from "react";
|
|
3
|
+
import { isActiveAgent, useCatalogAgents } from "../../identity/agent-catalog-lists.js";
|
|
4
|
+
import { conversationHistoryAgentIds, filterAgentsForFilter } from "./selectors.js";
|
|
5
|
+
function useAgentIdsForFilter(filter) {
|
|
6
|
+
const rows = useCatalogAgents();
|
|
7
|
+
return useMemo(() => {
|
|
8
|
+
const matching = filterAgentsForFilter(rows.filter(isActiveAgent), filter);
|
|
9
|
+
return conversationHistoryAgentIds(filter, matching.map((a) => a.id));
|
|
10
|
+
}, [rows, filter]);
|
|
11
|
+
}
|
|
12
|
+
export {
|
|
13
|
+
useAgentIdsForFilter
|
|
14
|
+
};
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { createSelector } from "@reduxjs/toolkit";
|
|
2
2
|
import { idMatchesQuery } from "@ai-matrx/kit/search-scoring";
|
|
3
|
-
import { selectAgentById } from "../agent-definition/selectors.js";
|
|
4
3
|
import {
|
|
5
4
|
defaultScopeState,
|
|
6
5
|
rowMatchesArchiveView
|
|
@@ -10,6 +9,7 @@ import {
|
|
|
10
9
|
normalizeLanes
|
|
11
10
|
} from "./lanes.js";
|
|
12
11
|
import { selectStoredConversationLanes } from "../../../host/prefs.js";
|
|
12
|
+
import { readAgentName } from "../../identity/agent-identity.js";
|
|
13
13
|
const selectConversationHistory = (state) => state.conversationHistory;
|
|
14
14
|
const selectSourceFacets = (state) => state.conversationHistory.sourceFacets;
|
|
15
15
|
const selectLaneCounts = createSelector(
|
|
@@ -120,8 +120,7 @@ const makeSelectGroupedByAgent = (scopeId) => {
|
|
|
120
120
|
for (const [agentId, agentItems] of buckets.entries()) {
|
|
121
121
|
let label = "Unknown agent";
|
|
122
122
|
if (agentId) {
|
|
123
|
-
|
|
124
|
-
label = agent?.name ?? agentId.slice(0, 8);
|
|
123
|
+
label = readAgentName(state, agentId) ?? agentId.slice(0, 8);
|
|
125
124
|
}
|
|
126
125
|
result.push({ agentId, label, items: agentItems });
|
|
127
126
|
}
|
|
@@ -24,7 +24,6 @@ import {
|
|
|
24
24
|
import { withSurfaceDocumentEvidence } from "../../../../surfaces/utils/document-evidence.js";
|
|
25
25
|
import { alwaysOnSurfaceKeys } from "../../../../surfaces/utils/always-on-context.js";
|
|
26
26
|
import {
|
|
27
|
-
ensureAgentIdentity,
|
|
28
27
|
fetchAgentRunTier
|
|
29
28
|
} from "../../agent-definition/thunks.js";
|
|
30
29
|
import {
|
|
@@ -81,6 +80,7 @@ import {
|
|
|
81
80
|
resolveLaunchMappingLayers,
|
|
82
81
|
resolvePerLaunchMappings
|
|
83
82
|
} from "./surface-scope-mapping.js";
|
|
83
|
+
import { ensureAgentCatalog } from "../../../identity/agent-identity.js";
|
|
84
84
|
function hasSignedInSession(state) {
|
|
85
85
|
return Boolean(state.userAuth?.accessToken);
|
|
86
86
|
}
|
|
@@ -217,7 +217,7 @@ const launchAgentExecution = createAsyncThunk("instances/launch", async (options
|
|
|
217
217
|
let bindingAutoRunGap = [];
|
|
218
218
|
if (agentId && !shortcutId) {
|
|
219
219
|
if (hasSignedInSession(getState())) {
|
|
220
|
-
void
|
|
220
|
+
void ensureAgentCatalog();
|
|
221
221
|
}
|
|
222
222
|
const preState = getState();
|
|
223
223
|
const payload = selectAgentRunTier(preState, agentId);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ensureAgentIdentity } from "../../agent-definition/thunks.js";
|
|
2
1
|
import { createAsyncThunk } from "@reduxjs/toolkit";
|
|
3
2
|
import { supabase } from "../../../../host/db.js";
|
|
4
3
|
import {
|
|
@@ -70,6 +69,7 @@ import {
|
|
|
70
69
|
} from "./conversation-bundle.js";
|
|
71
70
|
import { getClaimsUser } from "../../../../host/db.js";
|
|
72
71
|
import { canActOn } from "../../../../ui/canActOn.js";
|
|
72
|
+
import { ensureAgentCatalog } from "../../../identity/agent-identity.js";
|
|
73
73
|
const NOT_READABLE_DETAIL = "it may have been removed, or your sign-in lost access to it";
|
|
74
74
|
const loadConversation = createAsyncThunk(
|
|
75
75
|
"conversations/load",
|
|
@@ -326,7 +326,7 @@ const loadConversation = createAsyncThunk(
|
|
|
326
326
|
}
|
|
327
327
|
let baseInputCapabilities = {};
|
|
328
328
|
if (conv.initial_agent_id) {
|
|
329
|
-
void
|
|
329
|
+
void ensureAgentCatalog();
|
|
330
330
|
try {
|
|
331
331
|
baseInputCapabilities = await fetchInputCapabilitiesSnapshot({
|
|
332
332
|
agentId: conv.initial_agent_id,
|