@tutti-os/agent-gui 0.0.125 → 0.0.127
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/{AgentGUI-DMtA0gbf.d.ts → AgentGUI-DprRUk8h.d.ts} +10 -3
- package/dist/{AgentRichTextReadonly-G5D73743.js → AgentRichTextReadonly-SPIPM3UM.js} +5 -5
- package/dist/agent-conversation/index.d.ts +1 -1
- package/dist/agent-conversation/index.js +7 -7
- package/dist/agent-gui.d.ts +3 -3
- package/dist/agent-gui.js +15 -15
- package/dist/agent-message-center/index.js +6 -6
- package/dist/{agentFileMentionContracts-DY4Z70CN.d.ts → agentFileMentionContracts-CWAeuL7S.d.ts} +1 -1
- package/dist/{agentGuiNodeTypes-DedIWrEI.d.ts → agentGuiNodeTypes-5TL1hyCN.d.ts} +8 -2
- package/dist/app/renderer/agentactivity.css +10 -1
- package/dist/{chunk-A2B6QKNF.js → chunk-54GR2G3U.js} +10 -9
- package/dist/chunk-54GR2G3U.js.map +1 -0
- package/dist/{chunk-OKGXHKJ2.js → chunk-D5CIV4IB.js} +2 -2
- package/dist/chunk-D5CIV4IB.js.map +1 -0
- package/dist/{chunk-WIQHLQFN.js → chunk-EG7IIFNL.js} +3 -3
- package/dist/{chunk-XXACYFIR.js → chunk-JE2DXS4U.js} +2 -2
- package/dist/{chunk-ZCNZ53CF.js → chunk-JVISXD4K.js} +2 -2
- package/dist/{chunk-24TBYDXC.js → chunk-JWB5Z5GS.js} +4 -4
- package/dist/{chunk-KRG7EBHG.js → chunk-LWJITLCI.js} +2 -2
- package/dist/{chunk-JM24HADP.js → chunk-RMQREVJY.js} +1 -1
- package/dist/chunk-RMQREVJY.js.map +1 -0
- package/dist/{chunk-KACVD2GZ.js → chunk-T2CHVUXH.js} +11 -5
- package/dist/chunk-T2CHVUXH.js.map +1 -0
- package/dist/{chunk-UNCXTPFX.js → chunk-WB3KV4VH.js} +3 -3
- package/dist/{chunk-ARDFK5NC.js → chunk-WKFMSABH.js} +83 -5
- package/dist/chunk-WKFMSABH.js.map +1 -0
- package/dist/{chunk-5O42C33J.js → chunk-WKYMLLHT.js} +2 -2
- package/dist/{chunk-XJ2U66WG.js → chunk-YJKTYMF4.js} +170 -18
- package/dist/chunk-YJKTYMF4.js.map +1 -0
- package/dist/{chunk-RN7DI3Y2.js → chunk-YWKS4ESK.js} +2 -2
- package/dist/{chunk-HLXQ7BUI.js → chunk-ZXHXR2KT.js} +1049 -818
- package/dist/chunk-ZXHXR2KT.js.map +1 -0
- package/dist/context-mention-palette/index.d.ts +1 -1
- package/dist/context-mention-palette/index.js +8 -8
- package/dist/context-mention-provider.d.ts +15 -2
- package/dist/context-mention-provider.js +1 -1
- package/dist/i18n/index.d.ts +10 -4
- package/dist/i18n/index.js +2 -2
- package/dist/index.d.ts +5 -5
- package/dist/index.js +15 -15
- package/dist/index.js.map +1 -1
- package/dist/mention-search.d.ts +8 -3
- package/dist/mention-search.js +6 -6
- package/dist/workbench/contribution.js +3 -3
- package/dist/workbench/index.js +3 -3
- package/dist/workbench/sessionTitle.js +2 -2
- package/package.json +14 -14
- package/dist/chunk-A2B6QKNF.js.map +0 -1
- package/dist/chunk-ARDFK5NC.js.map +0 -1
- package/dist/chunk-HLXQ7BUI.js.map +0 -1
- package/dist/chunk-JM24HADP.js.map +0 -1
- package/dist/chunk-KACVD2GZ.js.map +0 -1
- package/dist/chunk-OKGXHKJ2.js.map +0 -1
- package/dist/chunk-XJ2U66WG.js.map +0 -1
- /package/dist/{AgentRichTextReadonly-G5D73743.js.map → AgentRichTextReadonly-SPIPM3UM.js.map} +0 -0
- /package/dist/{chunk-WIQHLQFN.js.map → chunk-EG7IIFNL.js.map} +0 -0
- /package/dist/{chunk-XXACYFIR.js.map → chunk-JE2DXS4U.js.map} +0 -0
- /package/dist/{chunk-ZCNZ53CF.js.map → chunk-JVISXD4K.js.map} +0 -0
- /package/dist/{chunk-24TBYDXC.js.map → chunk-JWB5Z5GS.js.map} +0 -0
- /package/dist/{chunk-KRG7EBHG.js.map → chunk-LWJITLCI.js.map} +0 -0
- /package/dist/{chunk-UNCXTPFX.js.map → chunk-WB3KV4VH.js.map} +0 -0
- /package/dist/{chunk-5O42C33J.js.map → chunk-WKYMLLHT.js.map} +0 -0
- /package/dist/{chunk-RN7DI3Y2.js.map → chunk-YWKS4ESK.js.map} +0 -0
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
formatAgentMentionMarkdown,
|
|
6
6
|
mentionItemToAttrs,
|
|
7
7
|
parseAgentMentionMarkdown
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LWJITLCI.js";
|
|
9
9
|
import {
|
|
10
10
|
cn,
|
|
11
11
|
resolveAgentTargetPresentation,
|
|
@@ -753,4 +753,4 @@ export {
|
|
|
753
753
|
agentRichTextContentToPromptText,
|
|
754
754
|
AgentRichTextReadonly
|
|
755
755
|
};
|
|
756
|
-
//# sourceMappingURL=chunk-
|
|
756
|
+
//# sourceMappingURL=chunk-WKYMLLHT.js.map
|
|
@@ -7,24 +7,24 @@ import {
|
|
|
7
7
|
} from "./chunk-XJ34OIEQ.js";
|
|
8
8
|
import {
|
|
9
9
|
normalizeAgentSessionMentionTitle
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-LWJITLCI.js";
|
|
11
11
|
import {
|
|
12
12
|
resolveAgentMentionFileThumbnailUrl
|
|
13
13
|
} from "./chunk-LUGELG5V.js";
|
|
14
14
|
import {
|
|
15
15
|
AGENT_CONTEXT_MENTION_PROVIDER_IDS
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-RMQREVJY.js";
|
|
17
17
|
import {
|
|
18
18
|
resolveWorkspaceAgentSessionSortTimeUnixMs
|
|
19
19
|
} from "./chunk-YMXYBG7U.js";
|
|
20
20
|
import {
|
|
21
21
|
getOptionalAgentHostApi,
|
|
22
22
|
workspaceAgentProviderLabel
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-D5CIV4IB.js";
|
|
24
24
|
import {
|
|
25
25
|
translate,
|
|
26
26
|
translateInUiLanguage
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-JVISXD4K.js";
|
|
28
28
|
import {
|
|
29
29
|
normalizeAgentTitleText
|
|
30
30
|
} from "./chunk-MIJXEELH.js";
|
|
@@ -594,7 +594,7 @@ function createAgentGeneratedFolderBackItem(browsePath) {
|
|
|
594
594
|
kind: "file",
|
|
595
595
|
href: "",
|
|
596
596
|
path: browsePath,
|
|
597
|
-
name: translate("agentHost.agentGui.
|
|
597
|
+
name: translate("agentHost.agentGui.mentionFolderBack"),
|
|
598
598
|
entryKind: "unknown",
|
|
599
599
|
directoryPath: parentAgentGeneratedDirectoryPath(browsePath),
|
|
600
600
|
mentionNavigation: "agent-generated-folder-back"
|
|
@@ -953,13 +953,22 @@ function providerItemToAgentMentionItem(input) {
|
|
|
953
953
|
}
|
|
954
954
|
if (input.insertResult.kind === "markdown-link") {
|
|
955
955
|
const href = input.insertResult.href.trim();
|
|
956
|
+
const directoryPath = input.directory?.path.trim() ?? "";
|
|
956
957
|
return {
|
|
957
958
|
kind: "file",
|
|
958
959
|
href,
|
|
959
|
-
path: href,
|
|
960
|
+
path: directoryPath || href,
|
|
960
961
|
name: label,
|
|
961
|
-
entryKind: href.endsWith("/") ? "directory" : "unknown",
|
|
962
|
-
directoryPath: dirnameFromProviderWorkspaceFileHref(
|
|
962
|
+
entryKind: directoryPath || href.endsWith("/") ? "directory" : "unknown",
|
|
963
|
+
directoryPath: dirnameFromProviderWorkspaceFileHref(
|
|
964
|
+
directoryPath || href
|
|
965
|
+
),
|
|
966
|
+
...directoryPath ? {
|
|
967
|
+
childCount: normalizeMentionDirectoryChildCount(
|
|
968
|
+
input.directory?.childCount
|
|
969
|
+
),
|
|
970
|
+
mentionNavigation: "workspace-folder"
|
|
971
|
+
} : {}
|
|
963
972
|
};
|
|
964
973
|
}
|
|
965
974
|
if (input.insertResult.kind !== "mention") {
|
|
@@ -974,6 +983,7 @@ function providerItemToAgentMentionItem(input) {
|
|
|
974
983
|
const presentation = mention.presentation ?? {};
|
|
975
984
|
const workspaceId = scope.workspaceId || input.workspaceId;
|
|
976
985
|
if (input.providerId === FILE_PROVIDER_ID || input.providerId === AGENT_GENERATED_FILE_PROVIDER_ID) {
|
|
986
|
+
const directoryPath = input.directory?.path.trim() ?? "";
|
|
977
987
|
return {
|
|
978
988
|
kind: "file",
|
|
979
989
|
href: createRichTextMentionHref2({
|
|
@@ -982,10 +992,18 @@ function providerItemToAgentMentionItem(input) {
|
|
|
982
992
|
label,
|
|
983
993
|
scope
|
|
984
994
|
}),
|
|
985
|
-
path: targetId,
|
|
995
|
+
path: directoryPath || targetId,
|
|
986
996
|
name: label,
|
|
987
|
-
entryKind: targetId.endsWith("/") ? "directory" : "unknown",
|
|
988
|
-
directoryPath: dirnameFromProviderWorkspaceFileHref(
|
|
997
|
+
entryKind: directoryPath || targetId.endsWith("/") ? "directory" : "unknown",
|
|
998
|
+
directoryPath: dirnameFromProviderWorkspaceFileHref(
|
|
999
|
+
directoryPath || targetId
|
|
1000
|
+
),
|
|
1001
|
+
...directoryPath ? {
|
|
1002
|
+
childCount: normalizeMentionDirectoryChildCount(
|
|
1003
|
+
input.directory?.childCount
|
|
1004
|
+
),
|
|
1005
|
+
mentionNavigation: "workspace-folder"
|
|
1006
|
+
} : {},
|
|
989
1007
|
thumbnailUrl: presentation.thumbnailUrl?.trim() || void 0
|
|
990
1008
|
};
|
|
991
1009
|
}
|
|
@@ -1084,6 +1102,12 @@ function providerItemToAgentMentionItem(input) {
|
|
|
1084
1102
|
}
|
|
1085
1103
|
return null;
|
|
1086
1104
|
}
|
|
1105
|
+
function normalizeMentionDirectoryChildCount(value) {
|
|
1106
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < 0) {
|
|
1107
|
+
return void 0;
|
|
1108
|
+
}
|
|
1109
|
+
return Math.floor(value);
|
|
1110
|
+
}
|
|
1087
1111
|
function normalizeMentionScope(scope) {
|
|
1088
1112
|
return Object.fromEntries(
|
|
1089
1113
|
Object.entries(scope ?? {}).map(([key, value]) => [key.trim(), value.trim()]).filter(([key, value]) => key.length > 0 && value.length > 0)
|
|
@@ -1633,7 +1657,7 @@ async function fetchAgentMentionFilterResult(input) {
|
|
|
1633
1657
|
}
|
|
1634
1658
|
}
|
|
1635
1659
|
async function queryAgentMentionProviderItems(input) {
|
|
1636
|
-
const
|
|
1660
|
+
const queryInput = {
|
|
1637
1661
|
keyword: input.query,
|
|
1638
1662
|
maxResults: input.limit,
|
|
1639
1663
|
abortSignal: input.abortSignal,
|
|
@@ -1648,7 +1672,11 @@ async function queryAgentMentionProviderItems(input) {
|
|
|
1648
1672
|
referenceProvenanceFilter: input.provenanceFilter ?? void 0
|
|
1649
1673
|
}
|
|
1650
1674
|
}
|
|
1651
|
-
}
|
|
1675
|
+
};
|
|
1676
|
+
const items = input.directoryPath && input.provider.queryDirectory ? await input.provider.queryDirectory({
|
|
1677
|
+
...queryInput,
|
|
1678
|
+
directoryPath: input.directoryPath
|
|
1679
|
+
}) : await input.provider.query(queryInput);
|
|
1652
1680
|
if (input.abortSignal.aborted) {
|
|
1653
1681
|
return [];
|
|
1654
1682
|
}
|
|
@@ -1764,6 +1792,7 @@ async function mapProviderItemsToAgentMentionItems(input) {
|
|
|
1764
1792
|
insertResult: input.provider.toInsertResult(item),
|
|
1765
1793
|
label: input.provider.getItemLabel(item),
|
|
1766
1794
|
providerId: input.provider.id,
|
|
1795
|
+
directory: input.provider.getItemDirectory?.(item) ?? null,
|
|
1767
1796
|
subtitle: input.provider.getItemSubtitle?.(item) ?? "",
|
|
1768
1797
|
workspaceId: input.workspaceId
|
|
1769
1798
|
});
|
|
@@ -1838,6 +1867,7 @@ var AgentMentionSearchControllerBase = class {
|
|
|
1838
1867
|
currentFileSearchLimit;
|
|
1839
1868
|
currentIssueSearchLimit;
|
|
1840
1869
|
agentGeneratedBrowsePath = null;
|
|
1870
|
+
workspaceFileBrowsePaths = [];
|
|
1841
1871
|
rawGroups = emptyAgentMentionRawGroups();
|
|
1842
1872
|
issueTopicGroups = null;
|
|
1843
1873
|
state = {
|
|
@@ -2145,6 +2175,7 @@ var AgentMentionSearchControllerBase = class {
|
|
|
2145
2175
|
provider,
|
|
2146
2176
|
workspaceId: input.workspaceId,
|
|
2147
2177
|
currentUserId: input.currentUserId,
|
|
2178
|
+
directoryPath: input.directoryPath,
|
|
2148
2179
|
query: input.query,
|
|
2149
2180
|
limit: input.limit,
|
|
2150
2181
|
sectionKey: input.sectionKey ?? this.currentSectionKey,
|
|
@@ -2253,6 +2284,9 @@ var AgentMentionSearchControllerBase = class {
|
|
|
2253
2284
|
resetAgentGeneratedBrowsePath() {
|
|
2254
2285
|
this.agentGeneratedBrowsePath = null;
|
|
2255
2286
|
}
|
|
2287
|
+
resetWorkspaceFileBrowsePaths() {
|
|
2288
|
+
this.workspaceFileBrowsePaths = [];
|
|
2289
|
+
}
|
|
2256
2290
|
resetTotalCounts() {
|
|
2257
2291
|
for (const groupId of [
|
|
2258
2292
|
"files",
|
|
@@ -2341,6 +2375,32 @@ var AgentMentionSearchControllerBase = class {
|
|
|
2341
2375
|
|
|
2342
2376
|
// agent-gui/agentGuiNode/AgentMentionSearchController.ts
|
|
2343
2377
|
import { referenceProvenanceFilterCacheKey as referenceProvenanceFilterCacheKey2 } from "@tutti-os/workspace-file-reference/core";
|
|
2378
|
+
|
|
2379
|
+
// agent-gui/agentGuiNode/agentMentionWorkspaceFilesPresentation.ts
|
|
2380
|
+
function presentWorkspaceFileDirectoryMentionItems(input) {
|
|
2381
|
+
return [createWorkspaceFileFolderBackItem(input.browsePath), ...input.items];
|
|
2382
|
+
}
|
|
2383
|
+
function createWorkspaceFileFolderBackItem(browsePath) {
|
|
2384
|
+
return {
|
|
2385
|
+
kind: "file",
|
|
2386
|
+
href: "",
|
|
2387
|
+
path: browsePath,
|
|
2388
|
+
name: translate("agentHost.agentGui.mentionFolderBack"),
|
|
2389
|
+
entryKind: "unknown",
|
|
2390
|
+
directoryPath: parentWorkspaceFileDirectoryPath(browsePath),
|
|
2391
|
+
mentionNavigation: "workspace-folder-back"
|
|
2392
|
+
};
|
|
2393
|
+
}
|
|
2394
|
+
function parentWorkspaceFileDirectoryPath(path) {
|
|
2395
|
+
const normalized = path.trim().replace(/\\/g, "/").replace(/\/+$/, "");
|
|
2396
|
+
const index = normalized.lastIndexOf("/");
|
|
2397
|
+
if (index <= 0) {
|
|
2398
|
+
return "/";
|
|
2399
|
+
}
|
|
2400
|
+
return normalized.slice(0, index);
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
// agent-gui/agentGuiNode/AgentMentionSearchController.ts
|
|
2344
2404
|
var AgentMentionSearchController = class extends AgentMentionSearchControllerBase {
|
|
2345
2405
|
issueLoadMoreRequests = /* @__PURE__ */ new Map();
|
|
2346
2406
|
setProvenanceCatalog(catalog) {
|
|
@@ -2389,6 +2449,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
|
|
|
2389
2449
|
this.cancelIssueLoadMoreRequests();
|
|
2390
2450
|
const requestId = ++this.requestId;
|
|
2391
2451
|
this.resetAgentGeneratedBrowsePath();
|
|
2452
|
+
this.resetWorkspaceFileBrowsePaths();
|
|
2392
2453
|
this.resetExpandedCounts();
|
|
2393
2454
|
this.resetSearchLimits();
|
|
2394
2455
|
this.resetRawGroups();
|
|
@@ -2442,6 +2503,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
|
|
|
2442
2503
|
this.cancelIssueLoadMoreRequests();
|
|
2443
2504
|
const requestId = ++this.requestId;
|
|
2444
2505
|
this.resetAgentGeneratedBrowsePath();
|
|
2506
|
+
this.resetWorkspaceFileBrowsePaths();
|
|
2445
2507
|
this.resetExpandedCounts();
|
|
2446
2508
|
this.resetSearchLimits();
|
|
2447
2509
|
this.resetRawGroups();
|
|
@@ -2582,11 +2644,12 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
|
|
|
2582
2644
|
enterCategory(category) {
|
|
2583
2645
|
this.setFilter(category);
|
|
2584
2646
|
}
|
|
2585
|
-
|
|
2647
|
+
selectFileMentionNavigationItem(item) {
|
|
2586
2648
|
if (item.kind !== "file" || !item.mentionNavigation) {
|
|
2587
2649
|
return false;
|
|
2588
2650
|
}
|
|
2589
2651
|
if (item.mentionNavigation === "agent-generated-folder") {
|
|
2652
|
+
this.resetWorkspaceFileBrowsePaths();
|
|
2590
2653
|
this.agentGeneratedBrowsePath = item.path;
|
|
2591
2654
|
this.expandedCounts.agent_generated_files = mentionGroupPageSize(
|
|
2592
2655
|
this.currentFilter,
|
|
@@ -2616,12 +2679,26 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
|
|
|
2616
2679
|
});
|
|
2617
2680
|
return true;
|
|
2618
2681
|
}
|
|
2682
|
+
if (item.mentionNavigation === "workspace-folder") {
|
|
2683
|
+
const path = item.path.trim();
|
|
2684
|
+
if (!path || this.currentFilter !== "file" || this.currentQuery) {
|
|
2685
|
+
return false;
|
|
2686
|
+
}
|
|
2687
|
+
this.resetAgentGeneratedBrowsePath();
|
|
2688
|
+
this.workspaceFileBrowsePaths.push(path);
|
|
2689
|
+
this.loadWorkspaceFileDirectory(path);
|
|
2690
|
+
return true;
|
|
2691
|
+
}
|
|
2692
|
+
if (item.mentionNavigation === "workspace-folder-back") {
|
|
2693
|
+
return this.exitWorkspaceFileBrowse();
|
|
2694
|
+
}
|
|
2619
2695
|
return false;
|
|
2620
2696
|
}
|
|
2621
|
-
|
|
2622
|
-
if (
|
|
2623
|
-
return
|
|
2697
|
+
exitFileMentionBrowse() {
|
|
2698
|
+
if (this.workspaceFileBrowsePaths.length > 0) {
|
|
2699
|
+
return this.exitWorkspaceFileBrowse();
|
|
2624
2700
|
}
|
|
2701
|
+
if (!this.agentGeneratedBrowsePath) return false;
|
|
2625
2702
|
this.resetAgentGeneratedBrowsePath();
|
|
2626
2703
|
this.setState({
|
|
2627
2704
|
status: this.state.status === "loading" ? "loading" : "ready",
|
|
@@ -2634,6 +2711,80 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
|
|
|
2634
2711
|
});
|
|
2635
2712
|
return true;
|
|
2636
2713
|
}
|
|
2714
|
+
exitWorkspaceFileBrowse() {
|
|
2715
|
+
if (this.workspaceFileBrowsePaths.length === 0) {
|
|
2716
|
+
return false;
|
|
2717
|
+
}
|
|
2718
|
+
this.workspaceFileBrowsePaths.pop();
|
|
2719
|
+
const parentPath = this.workspaceFileBrowsePaths.at(-1);
|
|
2720
|
+
if (parentPath) {
|
|
2721
|
+
this.loadWorkspaceFileDirectory(parentPath);
|
|
2722
|
+
return true;
|
|
2723
|
+
}
|
|
2724
|
+
this.startBrowseModeFetch("file");
|
|
2725
|
+
return true;
|
|
2726
|
+
}
|
|
2727
|
+
loadWorkspaceFileDirectory(directoryPath) {
|
|
2728
|
+
this.clearTimer();
|
|
2729
|
+
this.abortActiveRequest();
|
|
2730
|
+
this.cancelIssueLoadMoreRequests();
|
|
2731
|
+
const requestId = ++this.requestId;
|
|
2732
|
+
const workspaceId = this.activeWorkspaceId;
|
|
2733
|
+
this.setState({
|
|
2734
|
+
status: "loading",
|
|
2735
|
+
query: "",
|
|
2736
|
+
mode: "browse",
|
|
2737
|
+
filter: this.currentFilter,
|
|
2738
|
+
categories: buildBrowseCategories(),
|
|
2739
|
+
groups: this.groupsFromRawGroups(),
|
|
2740
|
+
error: null
|
|
2741
|
+
});
|
|
2742
|
+
const abortSignal = this.beginActiveRequest();
|
|
2743
|
+
const diagnostics = [];
|
|
2744
|
+
void this.queryProviderMentionItemsById({
|
|
2745
|
+
abortSignal,
|
|
2746
|
+
diagnostics,
|
|
2747
|
+
directoryPath,
|
|
2748
|
+
providerId: FILE_PROVIDER_ID,
|
|
2749
|
+
workspaceId,
|
|
2750
|
+
currentUserId: this.currentUserId,
|
|
2751
|
+
query: "",
|
|
2752
|
+
provenanceFilter: this.currentProvenanceFilter
|
|
2753
|
+
}).then((items) => {
|
|
2754
|
+
if (!this.canApply(requestId, workspaceId, "", "file") || this.workspaceFileBrowsePaths.at(-1) !== directoryPath) {
|
|
2755
|
+
return;
|
|
2756
|
+
}
|
|
2757
|
+
this.rawGroups.opened_files = presentWorkspaceFileDirectoryMentionItems(
|
|
2758
|
+
{
|
|
2759
|
+
browsePath: directoryPath,
|
|
2760
|
+
items
|
|
2761
|
+
}
|
|
2762
|
+
);
|
|
2763
|
+
this.totalCounts.opened_files = this.rawGroups.opened_files.length;
|
|
2764
|
+
this.setState({
|
|
2765
|
+
status: "ready",
|
|
2766
|
+
query: "",
|
|
2767
|
+
mode: "browse",
|
|
2768
|
+
filter: "file",
|
|
2769
|
+
categories: buildBrowseCategories(),
|
|
2770
|
+
groups: this.groupsFromRawGroups(),
|
|
2771
|
+
error: null
|
|
2772
|
+
});
|
|
2773
|
+
}).catch((error) => {
|
|
2774
|
+
if (!this.canApply(requestId, workspaceId, "", "file") || this.workspaceFileBrowsePaths.at(-1) !== directoryPath) {
|
|
2775
|
+
return;
|
|
2776
|
+
}
|
|
2777
|
+
this.setState({
|
|
2778
|
+
status: "error",
|
|
2779
|
+
query: "",
|
|
2780
|
+
mode: "browse",
|
|
2781
|
+
filter: "file",
|
|
2782
|
+
categories: buildBrowseCategories(),
|
|
2783
|
+
groups: this.groupsFromRawGroups(),
|
|
2784
|
+
error: error instanceof Error ? error.message : String(error)
|
|
2785
|
+
});
|
|
2786
|
+
});
|
|
2787
|
+
}
|
|
2637
2788
|
expandGroup(groupId) {
|
|
2638
2789
|
if (groupId.startsWith("issue-topic:")) {
|
|
2639
2790
|
this.loadMoreIssueTopic(groupId);
|
|
@@ -2706,6 +2857,7 @@ var AgentMentionSearchController = class extends AgentMentionSearchControllerBas
|
|
|
2706
2857
|
this.requestId += 1;
|
|
2707
2858
|
this.currentFilter = DEFAULT_AGENT_MENTION_FILTER;
|
|
2708
2859
|
this.resetAgentGeneratedBrowsePath();
|
|
2860
|
+
this.resetWorkspaceFileBrowsePaths();
|
|
2709
2861
|
this.resetExpandedCounts();
|
|
2710
2862
|
this.resetSearchLimits();
|
|
2711
2863
|
this.resetRawGroups();
|
|
@@ -2902,4 +3054,4 @@ export {
|
|
|
2902
3054
|
AgentMentionSearchController,
|
|
2903
3055
|
preloadAgentMentionBrowse
|
|
2904
3056
|
};
|
|
2905
|
-
//# sourceMappingURL=chunk-
|
|
3057
|
+
//# sourceMappingURL=chunk-YJKTYMF4.js.map
|