@xenosystem/agent-interface-ui 0.1.27 → 0.1.29
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/adapters/agentHostPlatformBridge.js +14 -14
- package/dist/adapters/agentHostPlatformBridge.js.map +1 -1
- package/dist/adapters/xenoAgentHostCatalog.d.ts.map +1 -1
- package/dist/adapters/xenoAgentHostCatalog.js +4 -1
- package/dist/adapters/xenoAgentHostCatalog.js.map +1 -1
- package/dist/agent.css +4 -0
- package/dist/components/agent/AgentInterface.d.ts.map +1 -1
- package/dist/components/agent/AgentInterface.js +30 -28
- package/dist/components/agent/AgentInterface.js.map +1 -1
- package/dist/components/agent/AgentView.d.ts +14 -1
- package/dist/components/agent/AgentView.d.ts.map +1 -1
- package/dist/components/agent/AgentView.js +12 -12
- package/dist/components/agent/AgentView.js.map +1 -1
- package/dist/components/agent/IntakePanel.js +4 -4
- package/dist/components/agent/IntakePanel.js.map +1 -1
- package/dist/components/agent/knowledgePanelController.js.map +1 -1
- package/dist/components/agent/personalConversationScope.d.ts +31 -2
- package/dist/components/agent/personalConversationScope.d.ts.map +1 -1
- package/dist/components/agent/personalConversationScope.js +38 -5
- package/dist/components/agent/personalConversationScope.js.map +1 -1
- package/dist/components/agent/subagentConversationProjection.js +1 -1
- package/dist/components/agent/subagentConversationProjection.js.map +1 -1
- package/dist/components/agent/terminalSurfaceAvailability.d.ts +1 -1
- package/dist/components/agent/terminalSurfaceAvailability.d.ts.map +1 -1
- package/dist/components/agent/terminalSurfaceAvailability.js +1 -1
- package/dist/components/agent/terminalSurfaceAvailability.js.map +1 -1
- package/dist/index.d.ts +38 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -0
- package/dist/index.js.map +1 -1
- package/dist/platformApiTypes.d.ts +38 -38
- package/dist/platformApiTypes.d.ts.map +1 -1
- package/dist/platformBridge.d.ts +21 -0
- package/dist/platformBridge.d.ts.map +1 -1
- package/dist/platformBridge.js +27 -0
- package/dist/platformBridge.js.map +1 -1
- package/dist/stores/agentChatStore.d.ts +16 -1
- package/dist/stores/agentChatStore.d.ts.map +1 -1
- package/dist/stores/agentChatStore.js +19 -17
- package/dist/stores/agentChatStore.js.map +1 -1
- package/dist/stores/xenoChatStore.d.ts.map +1 -1
- package/dist/stores/xenoChatStore.js +19 -9
- package/dist/stores/xenoChatStore.js.map +1 -1
- package/package.json +5 -5
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { getAgentPlatformBridge } from '../../platformBridge.js';
|
|
2
|
+
import { getAgentPlatformBridge, requireAgentPlatformCapability } from '../../platformBridge.js';
|
|
3
3
|
/*
|
|
4
4
|
* AgentInterface.tsx - AGENT Mode Interface
|
|
5
5
|
*
|
|
@@ -2871,11 +2871,12 @@ function Sidebar({ collapsed, onToggleCollapse, onOpenSettings, workspaces, setW
|
|
|
2871
2871
|
};
|
|
2872
2872
|
const summarizeSearchResult = async (event, result) => {
|
|
2873
2873
|
event.stopPropagation();
|
|
2874
|
-
|
|
2874
|
+
const hydrateResult = getAgentPlatformBridge()?.agentSearch?.hydrateResult;
|
|
2875
|
+
if (!hydrateResult) {
|
|
2875
2876
|
setSearchAttachNotice('Search hydration is not available.');
|
|
2876
2877
|
return;
|
|
2877
2878
|
}
|
|
2878
|
-
const response = await
|
|
2879
|
+
const response = await hydrateResult({ id: result.id });
|
|
2879
2880
|
if (!response?.success) {
|
|
2880
2881
|
setSearchAttachNotice(response?.error || 'Summary unavailable.');
|
|
2881
2882
|
return;
|
|
@@ -4411,7 +4412,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
4411
4412
|
const activeConversationAllowedDirectories = useMemo(() => {
|
|
4412
4413
|
if (!activeConversation)
|
|
4413
4414
|
return [];
|
|
4414
|
-
if (activeConversation.workspaceMode === 'chat
|
|
4415
|
+
if (activeConversation.workspaceMode === 'chat')
|
|
4415
4416
|
return [];
|
|
4416
4417
|
const granted = (activeConversation.grantedDirectories || [])
|
|
4417
4418
|
.map((dir) => normalizeDirectoryPath(dir))
|
|
@@ -4535,7 +4536,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
4535
4536
|
const terminalReady = terminalCapabilityEnabled && Boolean(resolvedTerminalCwd || activeConversationId);
|
|
4536
4537
|
const activeLane = activeSessionUi.activeLane;
|
|
4537
4538
|
const guiOwnsActiveProviderSession = Boolean(activeRuntimeRequestId && activeRuntimeConversationId === activeConversationId);
|
|
4538
|
-
const activeConversationWorkspaceMode = activeConversation?.workspaceMode === '
|
|
4539
|
+
const activeConversationWorkspaceMode = activeConversation?.workspaceMode === 'agent' ? 'agent' : 'chat';
|
|
4539
4540
|
const selectedRuntimeKind = activeConversation?.runtime?.selection.providerKind || 'sdk-native';
|
|
4540
4541
|
const xenoTuiState = xenoTuiAvailability({
|
|
4541
4542
|
conversationId: activeConversationId,
|
|
@@ -4785,8 +4786,8 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
4785
4786
|
: tab));
|
|
4786
4787
|
return;
|
|
4787
4788
|
}
|
|
4788
|
-
const workspaceMode = conversation.workspaceMode === '
|
|
4789
|
-
const workingDirectory = workspaceMode === '
|
|
4789
|
+
const workspaceMode = conversation.workspaceMode === 'agent' ? 'agent' : 'chat';
|
|
4790
|
+
const workingDirectory = workspaceMode === 'agent'
|
|
4790
4791
|
? (conversation.rootDirectory || conversation.grantedDirectories?.[0] || '')
|
|
4791
4792
|
: '';
|
|
4792
4793
|
const runtime = conversation.runtime;
|
|
@@ -5582,12 +5583,12 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
5582
5583
|
return;
|
|
5583
5584
|
initialLaunchModeHandledRef.current = true;
|
|
5584
5585
|
const conversationId = createConversation(MAIN_ASSISTANT_ID);
|
|
5585
|
-
const workspaceMode = initialLaunchMode === 'agent' && initialWorkspaceRoot ? '
|
|
5586
|
+
const workspaceMode = initialLaunchMode === 'agent' && initialWorkspaceRoot ? 'agent' : 'chat';
|
|
5586
5587
|
updateConversation(conversationId, {
|
|
5587
5588
|
schemaVersion: 3,
|
|
5588
5589
|
workspaceMode,
|
|
5589
|
-
rootDirectory: workspaceMode === '
|
|
5590
|
-
grantedDirectories: workspaceMode === '
|
|
5590
|
+
rootDirectory: workspaceMode === 'agent' ? initialWorkspaceRoot : undefined,
|
|
5591
|
+
grantedDirectories: workspaceMode === 'agent' && initialWorkspaceRoot ? [initialWorkspaceRoot] : [],
|
|
5591
5592
|
});
|
|
5592
5593
|
activateSessionConversation(conversationId);
|
|
5593
5594
|
}, [
|
|
@@ -6567,14 +6568,15 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
6567
6568
|
setCliControlPlaneVersionSkewWarning(undefined);
|
|
6568
6569
|
}, [selectedCliAppServerEndpoint]);
|
|
6569
6570
|
const handlePolicyRefresh = useCallback(async () => {
|
|
6570
|
-
|
|
6571
|
+
const policySnapshot = getAgentPlatformBridge()?.workspacePolicy?.snapshot;
|
|
6572
|
+
if (!policySnapshot) {
|
|
6571
6573
|
setPolicyError('Workspace policy API is unavailable.');
|
|
6572
6574
|
return;
|
|
6573
6575
|
}
|
|
6574
6576
|
setPolicyLoading(true);
|
|
6575
6577
|
setPolicyError(null);
|
|
6576
6578
|
try {
|
|
6577
|
-
const result = await
|
|
6579
|
+
const result = await policySnapshot({ caller: policyCaller });
|
|
6578
6580
|
if (!result?.success) {
|
|
6579
6581
|
setPolicyError('Failed to load workspace policy snapshot.');
|
|
6580
6582
|
return;
|
|
@@ -7336,7 +7338,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7336
7338
|
});
|
|
7337
7339
|
updateConversation(activeConversationId, {
|
|
7338
7340
|
schemaVersion: 3,
|
|
7339
|
-
workspaceMode: '
|
|
7341
|
+
workspaceMode: 'agent',
|
|
7340
7342
|
rootDirectory: normalizedDirectory,
|
|
7341
7343
|
grantedDirectories: prioritizeDirectory(activeConversation?.grantedDirectories, normalizedDirectory),
|
|
7342
7344
|
sessionUi: resetAcpContinuationForWorkspaceChange(activeConversation?.sessionUi),
|
|
@@ -7965,7 +7967,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7965
7967
|
const handleCodeRefreshContextPacks = useCallback(async () => {
|
|
7966
7968
|
if (!codeWorkbenchRootDirectory || !getAgentPlatformBridge()?.codeIndex?.listContextPacks)
|
|
7967
7969
|
return;
|
|
7968
|
-
const result = await
|
|
7970
|
+
const result = await requireAgentPlatformCapability('codeIndex').listContextPacks(codeIndexRequestBase);
|
|
7969
7971
|
if (!result?.success) {
|
|
7970
7972
|
setCodeWorkbenchError(result?.error || 'Failed to load context packs.');
|
|
7971
7973
|
return;
|
|
@@ -7975,7 +7977,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7975
7977
|
const handleCodeRefreshChanges = useCallback(async () => {
|
|
7976
7978
|
if (!codeWorkbenchRootDirectory || !getAgentPlatformBridge()?.codeIndex?.whatChanged)
|
|
7977
7979
|
return;
|
|
7978
|
-
const result = await
|
|
7980
|
+
const result = await requireAgentPlatformCapability('codeIndex').whatChanged({ ...codeIndexRequestBase, maxFiles: 80 });
|
|
7979
7981
|
if (!result?.success) {
|
|
7980
7982
|
setCodeWorkbenchError(result?.error || 'Failed to summarize workspace changes.');
|
|
7981
7983
|
return;
|
|
@@ -7996,7 +7998,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
7996
7998
|
setCodeWorkbenchLoading(true);
|
|
7997
7999
|
setCodeWorkbenchError(null);
|
|
7998
8000
|
try {
|
|
7999
|
-
const result = await
|
|
8001
|
+
const result = await requireAgentPlatformCapability('codeIndex').codeActions({
|
|
8000
8002
|
...codeIndexRequestBase,
|
|
8001
8003
|
filePath: targetPath,
|
|
8002
8004
|
limit: 24,
|
|
@@ -8034,7 +8036,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8034
8036
|
setCodeWorkbenchLoading(true);
|
|
8035
8037
|
setCodeWorkbenchError(null);
|
|
8036
8038
|
try {
|
|
8037
|
-
const result = await
|
|
8039
|
+
const result = await requireAgentPlatformCapability('codeIndex').indexWorkspace({
|
|
8038
8040
|
...codeIndexRequestBase,
|
|
8039
8041
|
force: true,
|
|
8040
8042
|
maxFiles: 50_000,
|
|
@@ -8083,7 +8085,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8083
8085
|
setCodeWorkbenchError(null);
|
|
8084
8086
|
try {
|
|
8085
8087
|
if (codeWorkbenchMode === 'files') {
|
|
8086
|
-
const result = await
|
|
8088
|
+
const result = await requireAgentPlatformCapability('codeIndex').searchFiles({
|
|
8087
8089
|
...codeIndexRequestBase,
|
|
8088
8090
|
query: codeWorkbenchQuery.trim(),
|
|
8089
8091
|
limit: 120,
|
|
@@ -8102,7 +8104,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8102
8104
|
setCodeWorkbenchError('Enter a text query first.');
|
|
8103
8105
|
return;
|
|
8104
8106
|
}
|
|
8105
|
-
const result = await
|
|
8107
|
+
const result = await requireAgentPlatformCapability('codeIndex').searchText({
|
|
8106
8108
|
...codeIndexRequestBase,
|
|
8107
8109
|
query,
|
|
8108
8110
|
limit: 120,
|
|
@@ -8114,7 +8116,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8114
8116
|
setCodeWorkbenchTextResults((result.results || []).flatMap((entry) => toCodeWorkbenchTextResult(entry) || []));
|
|
8115
8117
|
return;
|
|
8116
8118
|
}
|
|
8117
|
-
const result = await
|
|
8119
|
+
const result = await requireAgentPlatformCapability('codeIndex').listSymbols({
|
|
8118
8120
|
...codeIndexRequestBase,
|
|
8119
8121
|
query: codeWorkbenchQuery.trim(),
|
|
8120
8122
|
limit: 180,
|
|
@@ -8199,7 +8201,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8199
8201
|
setCodeWorkbenchLoading(true);
|
|
8200
8202
|
setCodeWorkbenchError(null);
|
|
8201
8203
|
try {
|
|
8202
|
-
const result = await
|
|
8204
|
+
const result = await requireAgentPlatformCapability('codeIndex').applyCodeAction({
|
|
8203
8205
|
...codeIndexRequestBase,
|
|
8204
8206
|
filePath: action.filePath,
|
|
8205
8207
|
line: action.line,
|
|
@@ -8262,7 +8264,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8262
8264
|
setCodeWorkbenchLoading(true);
|
|
8263
8265
|
setCodeWorkbenchError(null);
|
|
8264
8266
|
try {
|
|
8265
|
-
const result = await
|
|
8267
|
+
const result = await requireAgentPlatformCapability('codeIndex').organizeImports({
|
|
8266
8268
|
...codeIndexRequestBase,
|
|
8267
8269
|
filePath: targetPath,
|
|
8268
8270
|
});
|
|
@@ -8326,7 +8328,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8326
8328
|
setCodeWorkbenchLoading(true);
|
|
8327
8329
|
setCodeWorkbenchError(null);
|
|
8328
8330
|
try {
|
|
8329
|
-
const result = await
|
|
8331
|
+
const result = await requireAgentPlatformCapability('codeIndex').renameSymbol({
|
|
8330
8332
|
...codeIndexRequestBase,
|
|
8331
8333
|
filePath: targetPath,
|
|
8332
8334
|
line: selectedSymbol?.line || 1,
|
|
@@ -8377,7 +8379,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8377
8379
|
setCodeWorkbenchLoading(true);
|
|
8378
8380
|
setCodeWorkbenchError(null);
|
|
8379
8381
|
try {
|
|
8380
|
-
const result = await
|
|
8382
|
+
const result = await requireAgentPlatformCapability('codeIndex').languageServiceStatus(codeIndexRequestBase);
|
|
8381
8383
|
if (!result?.success) {
|
|
8382
8384
|
setCodeWorkbenchError(result?.error || 'Failed to probe language services.');
|
|
8383
8385
|
return;
|
|
@@ -8397,7 +8399,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8397
8399
|
setCodeWorkbenchLoading(true);
|
|
8398
8400
|
setCodeWorkbenchError(null);
|
|
8399
8401
|
try {
|
|
8400
|
-
const result = await
|
|
8402
|
+
const result = await requireAgentPlatformCapability('codeIndex').controlLanguageService({
|
|
8401
8403
|
...codeIndexRequestBase,
|
|
8402
8404
|
serviceId,
|
|
8403
8405
|
action,
|
|
@@ -8433,7 +8435,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8433
8435
|
setCodeWorkbenchLoading(true);
|
|
8434
8436
|
setCodeWorkbenchError(null);
|
|
8435
8437
|
try {
|
|
8436
|
-
const result = await
|
|
8438
|
+
const result = await requireAgentPlatformCapability('codeIndex').repairIndex({
|
|
8437
8439
|
...codeIndexRequestBase,
|
|
8438
8440
|
force: true,
|
|
8439
8441
|
maxFiles: 50_000,
|
|
@@ -8508,7 +8510,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8508
8510
|
setCodeWorkbenchLoading(true);
|
|
8509
8511
|
setCodeWorkbenchError(null);
|
|
8510
8512
|
try {
|
|
8511
|
-
const result = await
|
|
8513
|
+
const result = await requireAgentPlatformCapability('codeIndex').createContextPack({
|
|
8512
8514
|
...codeIndexRequestBase,
|
|
8513
8515
|
name: `Context pack ${new Date().toLocaleTimeString([], { hour: '2-digit', minute: '2-digit' })}`,
|
|
8514
8516
|
description: `Created from ${items.length} selected code item${items.length === 1 ? '' : 's'} in Hub.`,
|
|
@@ -8549,7 +8551,7 @@ export default function AgentInterface({ surface = 'embedded', initialSdkSession
|
|
|
8549
8551
|
setCodeWorkbenchLoading(true);
|
|
8550
8552
|
setCodeWorkbenchError(null);
|
|
8551
8553
|
try {
|
|
8552
|
-
const result = await
|
|
8554
|
+
const result = await requireAgentPlatformCapability('codeIndex').materializeContextPack({
|
|
8553
8555
|
...codeIndexRequestBase,
|
|
8554
8556
|
id: packId,
|
|
8555
8557
|
maxTokens: 24_000,
|