@tutti-os/agent-gui 0.0.58 → 0.0.59
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/dist/agent-conversation/index.d.ts +4 -4
- package/dist/agent-message-center/index.d.ts +2 -2
- package/dist/{agentConversationVM-Qbz9GBwR.d.ts → agentConversationVM-DPAgUJlR.d.ts} +1 -1
- package/dist/{agentGuiNodeTypes-BRU6P22B.d.ts → agentGuiNodeTypes-CupCLd9p.d.ts} +2 -2
- package/dist/index.d.ts +4 -4
- package/dist/index.js +169 -7
- package/dist/index.js.map +1 -1
- package/dist/plan-decision-ops.d.ts +2 -2
- package/dist/queued-prompt-runtime.d.ts +3 -3
- package/dist/workspace-agent-generated-files.d.ts +1 -1
- package/dist/{workspaceAgentActivityListViewModel-B5viw5Da.d.ts → workspaceAgentActivityListViewModel-DJvAqZso.d.ts} +1 -0
- package/package.json +12 -12
|
@@ -2,10 +2,10 @@ import * as react from 'react';
|
|
|
2
2
|
import { ReactNode, JSX } from 'react';
|
|
3
3
|
import { W as WorkspaceLinkAction } from '../workspaceLinkActions-Bjy_XfBm.js';
|
|
4
4
|
import { A as AgentMessageMarkdownWorkspaceAppIcon } from '../AgentMessageMarkdown-DeYPURtF.js';
|
|
5
|
-
import { c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-
|
|
6
|
-
export { B as BuildWorkspaceAgentSessionDetailInput, d as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-
|
|
7
|
-
import { d as AgentGUIProviderSkillOption } from '../agentGuiNodeTypes-
|
|
8
|
-
export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, q as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-
|
|
5
|
+
import { c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-DPAgUJlR.js';
|
|
6
|
+
export { B as BuildWorkspaceAgentSessionDetailInput, d as buildWorkspaceAgentSessionDetailViewModel } from '../agentConversationVM-DPAgUJlR.js';
|
|
7
|
+
import { d as AgentGUIProviderSkillOption } from '../agentGuiNodeTypes-CupCLd9p.js';
|
|
8
|
+
export { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, q as WorkspaceAgentActivityTimelineItem } from '../workspaceAgentActivityListViewModel-DJvAqZso.js';
|
|
9
9
|
import '@tutti-os/workspace-issue-manager/core';
|
|
10
10
|
import '@tutti-os/agent-activity-core';
|
|
11
11
|
import '../types-BsHvTjIZ.js';
|
|
@@ -4,8 +4,8 @@ import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
|
|
|
4
4
|
import { TranslateFn, useTranslation, AgentGuiI18nLocale } from '../i18n/index.js';
|
|
5
5
|
import { W as WorkspaceLinkAction } from '../workspaceLinkActions-Bjy_XfBm.js';
|
|
6
6
|
import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot } from '@tutti-os/agent-activity-core';
|
|
7
|
-
import { b as AgentConversationPromptVM } from '../agentConversationVM-
|
|
8
|
-
import { o as WorkspaceAgentActivityStatus } from '../workspaceAgentActivityListViewModel-
|
|
7
|
+
import { b as AgentConversationPromptVM } from '../agentConversationVM-DPAgUJlR.js';
|
|
8
|
+
import { o as WorkspaceAgentActivityStatus } from '../workspaceAgentActivityListViewModel-DJvAqZso.js';
|
|
9
9
|
export { PLAN_IMPLEMENTATION_ACTION_IMPLEMENT, PLAN_IMPLEMENTATION_PROMPT } from '../plan-decision-ops.js';
|
|
10
10
|
import '@tutti-os/workspace-issue-manager/core';
|
|
11
11
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, T as ToolCallStatusKind, q as WorkspaceAgentActivityTimelineItem } from './workspaceAgentActivityListViewModel-
|
|
1
|
+
import { W as WorkspaceAgentActivityCard, n as WorkspaceAgentActivitySession, T as ToolCallStatusKind, q as WorkspaceAgentActivityTimelineItem } from './workspaceAgentActivityListViewModel-DJvAqZso.js';
|
|
2
2
|
|
|
3
3
|
interface WorkspaceAgentSessionDetailMessage {
|
|
4
4
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { AgentActivityUsage } from '@tutti-os/agent-activity-core';
|
|
2
2
|
import { h as AgentHostAgentSessionCommand, i as AgentHostAgentSessionComposerSettings, k as AgentHostAgentSessionReasoningEffort, l as AgentHostAgentSessionSpeed, j as AgentHostAgentSessionPermissionConfig, m as AgentHostAgentSessionState, a as AgentGUIProvider, p as AgentPromptContentBlock, A as AgentGUINodeData, e as AgentGUIProviderTarget, b as AgentGUIProviderReadinessGate } from './types-BsHvTjIZ.js';
|
|
3
|
-
import { A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, l as AgentHostWorkspaceAgentSnapshot, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, p as WorkspaceAgentActivitySyncState } from './workspaceAgentActivityListViewModel-
|
|
4
|
-
import { A as AgentApprovalItemVM, a as AgentAskUserQuestionVM, b as AgentConversationPromptVM, c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from './agentConversationVM-
|
|
3
|
+
import { A as AgentHostBatchUserInfoInput, a as AgentHostBatchUserInfoResult, b as AgentHostDeleteWorkspaceAgentSessionInput, k as AgentHostWorkspaceAgentSessionSummaryInput, j as AgentHostWorkspaceAgentSessionSummary, e as AgentHostWorkspaceAgentListInput, l as AgentHostWorkspaceAgentSnapshot, i as AgentHostWorkspaceAgentSessionMessagesInput, h as AgentHostWorkspaceAgentSessionMessages, p as WorkspaceAgentActivitySyncState } from './workspaceAgentActivityListViewModel-DJvAqZso.js';
|
|
4
|
+
import { A as AgentApprovalItemVM, a as AgentAskUserQuestionVM, b as AgentConversationPromptVM, c as AgentConversationVM, W as WorkspaceAgentSessionDetailViewModel } from './agentConversationVM-DPAgUJlR.js';
|
|
5
5
|
import { WorkspaceUserProjectService } from '@tutti-os/workspace-user-project/contracts';
|
|
6
6
|
|
|
7
7
|
declare const APP_ERROR_CODES: readonly ["common.invalid_input", "common.approved_path_required", "common.unavailable", "common.unexpected", "session.not_found", "control_surface.unauthorized", "workspace.select_directory_failed", "workspace.select_files_failed", "workspace.ensure_directory_failed", "workspace.import_files_failed", "workspace.read_file_failed", "workspace.write_file_failed", "workspace.export_file_failed", "workspace.copy_path_failed", "workspace.host_unsupported", "workspace.runtime_artifact_unavailable", "runtime.guest_agent_lane_unavailable", "workspace.room_full", "workspace.room_delete_forbidden", "workspace.room_delete_not_found", "filesystem.create_directory_failed", "filesystem.read_file_bytes_failed", "filesystem.read_file_text_failed", "filesystem.write_file_text_failed", "filesystem.copy_entry_failed", "filesystem.move_entry_failed", "filesystem.rename_entry_failed", "filesystem.delete_entry_failed", "filesystem.read_directory_failed", "filesystem.stat_failed", "terminal.spawn_failed", "terminal.write_failed", "terminal.resize_failed", "terminal.close_failed", "terminal.attach_failed", "terminal.detach_failed", "terminal.snapshot_failed", "agent.list_models_failed", "agent.launch_failed", "agent.read_last_message_failed", "agent.provider_session_not_found", "agent.resume_session_not_local", "agent.resume_session_resolve_failed", "agent.settings_require_new_session", "task.suggest_title_failed", "persistence.unavailable", "persistence.quota_exceeded", "persistence.payload_too_large", "persistence.io_failed", "persistence.invalid_state", "persistence.invalid_node_id", "update.get_state_failed", "update.configure_failed", "update.check_failed", "update.download_failed", "update.install_failed", "PACKAGE_DOWNLOAD_INTERRUPTED", "PACKAGE_DOWNLOAD_HTTP_STATUS", "PACKAGE_DOWNLOAD_INVALID", "PACKAGE_DOWNLOAD_DISK_ERROR"];
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { AgentActivityNeedsAttentionItem, AgentActivitySnapshot, AgentActivityCancelSessionInput, AgentActivityCancelSessionResult, AgentActivityCreateSessionInput, AgentActivitySession, AgentActivityDeleteSessionInput, AgentActivityDeleteSessionResult, AgentActivitySendInput, AgentActivityMessageOrder, AgentActivityMessagePage, AgentActivitySendInputResult, AgentActivitySubmitInteractiveInput, AgentActivitySnapshotListener } from '@tutti-os/agent-activity-core';
|
|
2
2
|
export { AgentActivityAdapter, AgentActivityController, AgentActivityMessage, AgentActivityNeedsAttentionItem, AgentActivitySnapshot, selectNeedsAttentionCount, selectNeedsAttentionItems } from '@tutti-os/agent-activity-core';
|
|
3
|
-
import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-
|
|
3
|
+
import { m as WorkspaceAgentActivityListViewModel, g as AgentHostWorkspaceAgentSession, f as AgentHostWorkspaceAgentMessage, l as AgentHostWorkspaceAgentSnapshot, B as BuildWorkspaceAgentActivityListOptions, d as AgentHostRuntimeOpenclawGatewayWarmupResult, c as AgentHostManagedAgentsState } from './workspaceAgentActivityListViewModel-DJvAqZso.js';
|
|
4
4
|
import * as react from 'react';
|
|
5
5
|
import { ReactNode, PropsWithChildren, JSX } from 'react';
|
|
6
6
|
import { I18nRuntime } from '@tutti-os/ui-i18n-runtime';
|
|
7
7
|
import { q as AgentProvider, f as AgentGUIProviderTargetRef, i as AgentHostAgentSessionComposerSettings, g as AgentHostActivateAgentSessionResult, o as AgentHostUpdateAgentSessionSettingsResult, m as AgentHostAgentSessionState, n as AgentHostUnactivateAgentSessionResult, A as AgentGUINodeData, e as AgentGUIProviderTarget, a as AgentGUIProvider, p as AgentPromptContentBlock, P as Point, b as AgentGUIProviderReadinessGate, N as NodeFrame } from './types-BsHvTjIZ.js';
|
|
8
8
|
export { c as AgentGUIProviderReadinessGateAction, d as AgentGUIProviderReadinessGateStatus } from './types-BsHvTjIZ.js';
|
|
9
|
-
import { l as AgentProbeSnapshot, A as AgentComposerDraft, o as AgentSessionCommand, d as AgentGUIProviderSkillOption, a as AgentGUIComposerSettingsVM, e as AgentGUIQueuedPromptVM, c as AgentGUINodeViewModel, b as AgentGUIConversationScope, h as AgentHostInputApi } from './agentGuiNodeTypes-
|
|
10
|
-
export { f as AgentHostApi, g as AgentHostApplyWorkspaceGitPatchInput, i as AgentHostRuntimeApi, j as AgentHostSelectFilesInput, k as AgentProbeProvider, m as AgentProviderProbeListInput, n as AgentProviderProbeListResult, p as AgentUsageQuota, q as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, r as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-
|
|
9
|
+
import { l as AgentProbeSnapshot, A as AgentComposerDraft, o as AgentSessionCommand, d as AgentGUIProviderSkillOption, a as AgentGUIComposerSettingsVM, e as AgentGUIQueuedPromptVM, c as AgentGUINodeViewModel, b as AgentGUIConversationScope, h as AgentHostInputApi } from './agentGuiNodeTypes-CupCLd9p.js';
|
|
10
|
+
export { f as AgentHostApi, g as AgentHostApplyWorkspaceGitPatchInput, i as AgentHostRuntimeApi, j as AgentHostSelectFilesInput, k as AgentProbeProvider, m as AgentProviderProbeListInput, n as AgentProviderProbeListResult, p as AgentUsageQuota, q as AgentUsageSnapshot, P as PersistWriteResult, R as ReadWorkspaceAgentReadStateInput, W as WorkspaceAgentReadStateSnapshot, r as WriteWorkspaceAgentReadStateInput } from './agentGuiNodeTypes-CupCLd9p.js';
|
|
11
11
|
import { WorkspaceFileEntry } from '@tutti-os/workspace-file-manager/services';
|
|
12
12
|
import { WorkspaceFileReference, ReferenceLocateTarget, WorkspaceFileReferenceAdapter } from '@tutti-os/workspace-file-reference/contracts';
|
|
13
13
|
import { ReferenceSourceAggregator } from '@tutti-os/workspace-file-reference/core';
|
|
@@ -15,7 +15,7 @@ import { U as UiLanguage, a as UiTheme } from './uiSettings-BQS9r2eo.js';
|
|
|
15
15
|
import { W as WorkspaceLinkAction } from './workspaceLinkActions-Bjy_XfBm.js';
|
|
16
16
|
import { A as AgentContextMentionItem } from './AgentMentionSearchController-Po0KQLcL.js';
|
|
17
17
|
export { p as preloadAgentMentionBrowse } from './AgentMentionSearchController-Po0KQLcL.js';
|
|
18
|
-
import { b as AgentConversationPromptVM } from './agentConversationVM-
|
|
18
|
+
import { b as AgentConversationPromptVM } from './agentConversationVM-DPAgUJlR.js';
|
|
19
19
|
import { WorkspaceUserProjectI18nRuntime } from '@tutti-os/workspace-user-project/i18n';
|
|
20
20
|
import { WorkspaceUserProjectSelectChangeAction } from '@tutti-os/workspace-user-project/ui';
|
|
21
21
|
import { WorkspaceUserProject } from '@tutti-os/workspace-user-project/contracts';
|
package/dist/index.js
CHANGED
|
@@ -4903,6 +4903,13 @@ function conversationFilterKey(filter, provider) {
|
|
|
4903
4903
|
}
|
|
4904
4904
|
return `agent-target:${normalized.agentTargetId}`;
|
|
4905
4905
|
}
|
|
4906
|
+
function conversationRetainableForQueryFilter(conversation, filter) {
|
|
4907
|
+
if (!conversation || !filter || filter.kind !== "agentTarget") {
|
|
4908
|
+
return true;
|
|
4909
|
+
}
|
|
4910
|
+
const agentTargetId = conversation.agentTargetId?.trim() ?? "";
|
|
4911
|
+
return agentTargetId.length === 0 || agentTargetId === filter.agentTargetId;
|
|
4912
|
+
}
|
|
4906
4913
|
function createAgentGUIConversationListQueryKey(input) {
|
|
4907
4914
|
const normalized = normalizeQuery(input);
|
|
4908
4915
|
if (!normalized) {
|
|
@@ -5703,24 +5710,53 @@ async function refreshAgentGUIConversationListQuery(query, reason, options = {})
|
|
|
5703
5710
|
...dirtySessionIds,
|
|
5704
5711
|
...baseConversations.map((conversation) => conversation.id)
|
|
5705
5712
|
]) : null;
|
|
5706
|
-
const
|
|
5713
|
+
const currentConversationsById = new Map(
|
|
5714
|
+
currentConversations.map((conversation) => [
|
|
5715
|
+
conversation.id,
|
|
5716
|
+
conversation
|
|
5717
|
+
])
|
|
5718
|
+
);
|
|
5719
|
+
const snapshotSessionAgentTargetIdById = new Map(
|
|
5720
|
+
workspaceAgentSnapshot.sessions.flatMap((session) => {
|
|
5721
|
+
const agentSessionId = session.agentSessionId.trim();
|
|
5722
|
+
const agentTargetId = session.agentTargetId?.trim() ?? "";
|
|
5723
|
+
return agentSessionId && agentTargetId ? [[agentSessionId, agentTargetId]] : [];
|
|
5724
|
+
})
|
|
5725
|
+
);
|
|
5726
|
+
const retainableForQueryFilter = (agentSessionId) => {
|
|
5727
|
+
const filter = state.query.conversationFilter;
|
|
5728
|
+
if (!filter || filter.kind !== "agentTarget") {
|
|
5729
|
+
return true;
|
|
5730
|
+
}
|
|
5731
|
+
const snapshotAgentTargetId = snapshotSessionAgentTargetIdById.get(agentSessionId);
|
|
5732
|
+
if (snapshotAgentTargetId) {
|
|
5733
|
+
return snapshotAgentTargetId === filter.agentTargetId;
|
|
5734
|
+
}
|
|
5735
|
+
return conversationRetainableForQueryFilter(
|
|
5736
|
+
currentConversationsById.get(agentSessionId),
|
|
5737
|
+
filter
|
|
5738
|
+
);
|
|
5739
|
+
};
|
|
5740
|
+
const retainedSessionIds = new Set(
|
|
5741
|
+
[...retainedSnapshotSessionIds].filter(retainableForQueryFilter)
|
|
5742
|
+
);
|
|
5707
5743
|
if (reason === "workspace-agent-update") {
|
|
5708
5744
|
for (const conversation of currentConversations) {
|
|
5709
|
-
if (!nextDeletedConversationIds.has(conversation.id)) {
|
|
5745
|
+
if (!nextDeletedConversationIds.has(conversation.id) && retainableForQueryFilter(conversation.id)) {
|
|
5710
5746
|
retainedSessionIds.add(conversation.id);
|
|
5711
5747
|
}
|
|
5712
5748
|
}
|
|
5713
5749
|
}
|
|
5714
5750
|
if (retainedSnapshotSessionIds.size > 0) {
|
|
5715
5751
|
for (const agentSessionId of localCreatedConversationIds) {
|
|
5716
|
-
if (!nextDeletedConversationIds.has(agentSessionId)) {
|
|
5752
|
+
if (!nextDeletedConversationIds.has(agentSessionId) && retainableForQueryFilter(agentSessionId)) {
|
|
5717
5753
|
retainedSessionIds.add(agentSessionId);
|
|
5718
5754
|
}
|
|
5719
5755
|
}
|
|
5720
5756
|
}
|
|
5721
5757
|
if (canApplyDirtySessionProjection) {
|
|
5722
5758
|
for (const conversation of currentConversations) {
|
|
5723
|
-
if (!nextDeletedConversationIds.has(conversation.id)) {
|
|
5759
|
+
if (!nextDeletedConversationIds.has(conversation.id) && retainableForQueryFilter(conversation.id)) {
|
|
5724
5760
|
retainedSessionIds.add(conversation.id);
|
|
5725
5761
|
}
|
|
5726
5762
|
}
|
|
@@ -6789,6 +6825,30 @@ function reportAgentGUIRuntimeError(input) {
|
|
|
6789
6825
|
} catch {
|
|
6790
6826
|
}
|
|
6791
6827
|
}
|
|
6828
|
+
function reportAgentGUIConversationFilterTargetUnresolved(input) {
|
|
6829
|
+
const reportDiagnostic = input.runtime.reportDiagnostic;
|
|
6830
|
+
if (!reportDiagnostic) {
|
|
6831
|
+
return;
|
|
6832
|
+
}
|
|
6833
|
+
try {
|
|
6834
|
+
void Promise.resolve(
|
|
6835
|
+
reportDiagnostic.call(input.runtime, {
|
|
6836
|
+
details: {
|
|
6837
|
+
provider: input.provider,
|
|
6838
|
+
providerTargetCount: input.providerTargetCount,
|
|
6839
|
+
providerTargetId: input.providerTargetId,
|
|
6840
|
+
reason: input.reason
|
|
6841
|
+
},
|
|
6842
|
+
event: "agent.gui.conversation_filter.target_unresolved",
|
|
6843
|
+
level: "warn",
|
|
6844
|
+
source: "agent-gui",
|
|
6845
|
+
workspaceId: input.workspaceId
|
|
6846
|
+
})
|
|
6847
|
+
).catch(() => {
|
|
6848
|
+
});
|
|
6849
|
+
} catch {
|
|
6850
|
+
}
|
|
6851
|
+
}
|
|
6792
6852
|
function reportAgentGUIMessagePageDiagnostic(input) {
|
|
6793
6853
|
const reportDiagnostic = input.runtime.reportDiagnostic;
|
|
6794
6854
|
if (!reportDiagnostic) {
|
|
@@ -8808,6 +8868,8 @@ function useAgentGUINodeController({
|
|
|
8808
8868
|
const [conversationFilter, setConversationFilter] = useState4(
|
|
8809
8869
|
() => createAgentGUIConversationFilterState().filter
|
|
8810
8870
|
);
|
|
8871
|
+
const conversationFilterRef = useRef4(conversationFilter);
|
|
8872
|
+
conversationFilterRef.current = conversationFilter;
|
|
8811
8873
|
const canUseConversationTargetFilter = conversationScope === "multi-provider";
|
|
8812
8874
|
const queryConversationFilter = canUseConversationTargetFilter ? conversationFilter : null;
|
|
8813
8875
|
useEffect4(() => {
|
|
@@ -11669,14 +11731,25 @@ function useAgentGUINodeController({
|
|
|
11669
11731
|
activatedConversationIdsRef.current.add(conversation2.id);
|
|
11670
11732
|
setTransientConversation(conversation2);
|
|
11671
11733
|
if (conversationListQuery) {
|
|
11734
|
+
const createdAgentTargetId = normalizeOptionalText2(conversation2.agentTargetId) ?? targetData.agentTargetId;
|
|
11735
|
+
const currentQueryFilter = conversationListQuery.conversationFilter;
|
|
11736
|
+
const filterExcludesCreatedConversation = currentQueryFilter?.kind === "agentTarget" && currentQueryFilter.agentTargetId !== (createdAgentTargetId ?? "");
|
|
11737
|
+
const createdConversationFilter = createdAgentTargetId ? { kind: "agentTarget", agentTargetId: createdAgentTargetId } : { kind: "all" };
|
|
11738
|
+
const createdConversationQuery = filterExcludesCreatedConversation ? {
|
|
11739
|
+
...conversationListQuery,
|
|
11740
|
+
conversationFilter: createdConversationFilter
|
|
11741
|
+
} : conversationListQuery;
|
|
11672
11742
|
upsertLocalCreatedAgentGUIConversation({
|
|
11673
|
-
query:
|
|
11743
|
+
query: createdConversationQuery,
|
|
11674
11744
|
conversation: conversation2
|
|
11675
11745
|
});
|
|
11676
11746
|
scheduleAgentGUIConversationListProjection(
|
|
11677
|
-
|
|
11747
|
+
createdConversationQuery,
|
|
11678
11748
|
"local-create"
|
|
11679
11749
|
);
|
|
11750
|
+
if (filterExcludesCreatedConversation) {
|
|
11751
|
+
setConversationFilter(createdConversationFilter);
|
|
11752
|
+
}
|
|
11680
11753
|
}
|
|
11681
11754
|
setAgentSessionViewMessagesLoading(
|
|
11682
11755
|
sessionViewRef(conversation2.id),
|
|
@@ -11850,12 +11923,28 @@ function useAgentGUINodeController({
|
|
|
11850
11923
|
setIsLoadingMessages(false);
|
|
11851
11924
|
setDetailError(null);
|
|
11852
11925
|
persistActiveConversation(null);
|
|
11926
|
+
const filter = conversationFilterRef.current;
|
|
11927
|
+
if (canUseConversationTargetFilter && filter.kind === "agentTarget") {
|
|
11928
|
+
const filterTarget = resolveAgentGUIProviderTarget({
|
|
11929
|
+
agentTargetId: filter.agentTargetId,
|
|
11930
|
+
defaultProviderTargetId,
|
|
11931
|
+
fallbackToLocal: false,
|
|
11932
|
+
provider: dataRef.current.provider,
|
|
11933
|
+
providerTargets: normalizedProviderTargets
|
|
11934
|
+
});
|
|
11935
|
+
if (filterTarget && filterTarget.disabled !== true && (filterTarget.agentTargetId?.trim() ?? "") === filter.agentTargetId) {
|
|
11936
|
+
setHomeComposerTargetOverride(filterTarget);
|
|
11937
|
+
}
|
|
11938
|
+
}
|
|
11853
11939
|
loadDraftComposerOptions();
|
|
11854
11940
|
},
|
|
11855
11941
|
[
|
|
11856
11942
|
activation,
|
|
11857
11943
|
agentActivityRuntime,
|
|
11944
|
+
canUseConversationTargetFilter,
|
|
11945
|
+
defaultProviderTargetId,
|
|
11858
11946
|
loadDraftComposerOptions,
|
|
11947
|
+
normalizedProviderTargets,
|
|
11859
11948
|
persistActiveConversation,
|
|
11860
11949
|
workspaceId
|
|
11861
11950
|
]
|
|
@@ -13677,6 +13766,66 @@ function useAgentGUINodeController({
|
|
|
13677
13766
|
userProjects,
|
|
13678
13767
|
workspacePath
|
|
13679
13768
|
]);
|
|
13769
|
+
useEffect4(() => {
|
|
13770
|
+
if (previewMode || providerTargetsLoading || !activeConversationId) {
|
|
13771
|
+
return;
|
|
13772
|
+
}
|
|
13773
|
+
const summary = resolveConversationSummaryById(
|
|
13774
|
+
conversations,
|
|
13775
|
+
activeConversationId,
|
|
13776
|
+
transientConversationRef.current
|
|
13777
|
+
);
|
|
13778
|
+
if (!summary || summary.provider === "unknown") {
|
|
13779
|
+
return;
|
|
13780
|
+
}
|
|
13781
|
+
const summaryAgentTargetId = normalizeOptionalText2(summary.agentTargetId);
|
|
13782
|
+
const providerMismatch = dataRef.current.provider !== summary.provider;
|
|
13783
|
+
const agentTargetMismatch = summaryAgentTargetId !== null && normalizeOptionalText2(dataRef.current.agentTargetId) !== summaryAgentTargetId;
|
|
13784
|
+
if (!providerMismatch && !agentTargetMismatch) {
|
|
13785
|
+
return;
|
|
13786
|
+
}
|
|
13787
|
+
const sessionTarget = resolveAgentGUIProviderTarget({
|
|
13788
|
+
agentTargetId: summaryAgentTargetId,
|
|
13789
|
+
defaultProviderTargetId,
|
|
13790
|
+
fallbackToLocal: shouldFallbackToLocalProviderTargets,
|
|
13791
|
+
provider: summary.provider,
|
|
13792
|
+
providerTargets: normalizedProviderTargets
|
|
13793
|
+
});
|
|
13794
|
+
if (!sessionTarget || sessionTarget.provider !== summary.provider) {
|
|
13795
|
+
return;
|
|
13796
|
+
}
|
|
13797
|
+
if (!providerMismatch && summaryAgentTargetId !== null && (sessionTarget.agentTargetId?.trim() ?? "") !== summaryAgentTargetId) {
|
|
13798
|
+
return;
|
|
13799
|
+
}
|
|
13800
|
+
setHomeComposerTargetOverride(null);
|
|
13801
|
+
const sessionTargetIsExplicit = normalizedExplicitProviderTargets.some(
|
|
13802
|
+
(target) => target.provider === sessionTarget.provider && target.targetId === sessionTarget.targetId && agentGUIProviderTargetRefsEqual(target.ref, sessionTarget.ref)
|
|
13803
|
+
);
|
|
13804
|
+
onDataChangeRef.current((current) => {
|
|
13805
|
+
const targetData = composerTargetDataFromProviderTarget({
|
|
13806
|
+
current,
|
|
13807
|
+
isExplicit: sessionTargetIsExplicit,
|
|
13808
|
+
target: sessionTarget
|
|
13809
|
+
});
|
|
13810
|
+
if (current.provider === targetData.provider && normalizeOptionalText2(current.agentTargetId) === targetData.agentTargetId && (current.providerTargetId ?? null) === targetData.providerTargetId && agentGUIProviderTargetRefsEqual(
|
|
13811
|
+
current.providerTargetRef,
|
|
13812
|
+
targetData.providerTargetRef
|
|
13813
|
+
)) {
|
|
13814
|
+
return current;
|
|
13815
|
+
}
|
|
13816
|
+
dataRef.current = targetData.data;
|
|
13817
|
+
return targetData.data;
|
|
13818
|
+
});
|
|
13819
|
+
}, [
|
|
13820
|
+
activeConversationId,
|
|
13821
|
+
conversations,
|
|
13822
|
+
defaultProviderTargetId,
|
|
13823
|
+
normalizedExplicitProviderTargets,
|
|
13824
|
+
normalizedProviderTargets,
|
|
13825
|
+
previewMode,
|
|
13826
|
+
providerTargetsLoading,
|
|
13827
|
+
shouldFallbackToLocalProviderTargets
|
|
13828
|
+
]);
|
|
13680
13829
|
const visibleConversationsRef = useRef4(
|
|
13681
13830
|
null
|
|
13682
13831
|
);
|
|
@@ -14359,17 +14508,30 @@ function useAgentGUINodeController({
|
|
|
14359
14508
|
providerTargets: normalizedProviderTargets
|
|
14360
14509
|
});
|
|
14361
14510
|
if (!nextTarget || nextTarget.disabled === true) {
|
|
14511
|
+
reportAgentGUIConversationFilterTargetUnresolved({
|
|
14512
|
+
provider: input.provider,
|
|
14513
|
+
providerTargetId: input.providerTargetId ?? null,
|
|
14514
|
+
providerTargetCount: normalizedProviderTargets.length,
|
|
14515
|
+
reason: nextTarget ? "disabled" : "unresolved",
|
|
14516
|
+
runtime: agentActivityRuntime,
|
|
14517
|
+
workspaceId
|
|
14518
|
+
});
|
|
14362
14519
|
return;
|
|
14363
14520
|
}
|
|
14521
|
+
if (activeConversationIdRef.current === null) {
|
|
14522
|
+
setHomeComposerTargetOverride(nextTarget);
|
|
14523
|
+
}
|
|
14364
14524
|
const agentTargetId = nextTarget.agentTargetId?.trim() ?? "";
|
|
14365
14525
|
const nextFilter = agentTargetId ? { kind: "agentTarget", agentTargetId } : { kind: "all" };
|
|
14366
14526
|
setConversationFilter(nextFilter);
|
|
14367
14527
|
},
|
|
14368
14528
|
[
|
|
14529
|
+
agentActivityRuntime,
|
|
14369
14530
|
canUseConversationTargetFilter,
|
|
14370
14531
|
defaultProviderTargetId,
|
|
14371
14532
|
normalizedProviderTargets,
|
|
14372
|
-
shouldFallbackToLocalProviderTargets
|
|
14533
|
+
shouldFallbackToLocalProviderTargets,
|
|
14534
|
+
workspaceId
|
|
14373
14535
|
]
|
|
14374
14536
|
);
|
|
14375
14537
|
const stableCreateConversation = useStableControllerEventCallback(createConversation);
|