@tutti-os/agent-gui 0.0.105 → 0.0.106
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-gui.js +3 -3
- package/dist/{chunk-N3HTEYLZ.js → chunk-4HSLSSPJ.js} +82 -8
- package/dist/chunk-4HSLSSPJ.js.map +1 -0
- package/dist/{chunk-JG7HGKZL.js → chunk-BXOKBZH4.js} +135 -18
- package/dist/chunk-BXOKBZH4.js.map +1 -0
- package/dist/{chunk-6R7GHXRQ.js → chunk-P3CVAWGJ.js} +10 -5
- package/dist/chunk-P3CVAWGJ.js.map +1 -0
- package/dist/context-mention-palette/index.js +2 -2
- package/dist/index.js +3 -3
- package/dist/mention-search.d.ts +7 -3
- package/dist/mention-search.js +1 -1
- package/package.json +12 -12
- package/dist/chunk-6R7GHXRQ.js.map +0 -1
- package/dist/chunk-JG7HGKZL.js.map +0 -1
- package/dist/chunk-N3HTEYLZ.js.map +0 -1
package/dist/agent-gui.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
AgentGUI
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-4HSLSSPJ.js";
|
|
4
4
|
import "./chunk-ZSJBCZUH.js";
|
|
5
5
|
import "./chunk-V5ROOS2O.js";
|
|
6
6
|
import "./chunk-4YVKAPKW.js";
|
|
@@ -10,11 +10,11 @@ import "./chunk-UHBCM6RO.js";
|
|
|
10
10
|
import "./chunk-IR2CL2X2.js";
|
|
11
11
|
import "./chunk-UFIEUC3Y.js";
|
|
12
12
|
import "./chunk-7BXWPI4F.js";
|
|
13
|
-
import "./chunk-
|
|
13
|
+
import "./chunk-P3CVAWGJ.js";
|
|
14
14
|
import "./chunk-C35SNDVZ.js";
|
|
15
15
|
import "./chunk-FGLQZ6I4.js";
|
|
16
16
|
import "./chunk-4YG7YK7S.js";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-BXOKBZH4.js";
|
|
18
18
|
import "./chunk-4YCCATI4.js";
|
|
19
19
|
import "./chunk-XJ34OIEQ.js";
|
|
20
20
|
import "./chunk-J2HG7UCP.js";
|
|
@@ -77,7 +77,7 @@ import {
|
|
|
77
77
|
import {
|
|
78
78
|
AgentFileMentionPalette,
|
|
79
79
|
agentMentionItemKey
|
|
80
|
-
} from "./chunk-
|
|
80
|
+
} from "./chunk-P3CVAWGJ.js";
|
|
81
81
|
import {
|
|
82
82
|
normalizeAgentGUIAgents,
|
|
83
83
|
projectAgentGUIAgentsToInternalTargets
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
DEFAULT_AGENT_MENTION_FILTER,
|
|
89
89
|
agentGuiScheduler,
|
|
90
90
|
buildWorkspaceAgentActivityListViewModel
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-BXOKBZH4.js";
|
|
92
92
|
import {
|
|
93
93
|
AGENT_RICH_TEXT_CARET_ANCHOR,
|
|
94
94
|
createAgentSessionMarkdownLink,
|
|
@@ -2218,7 +2218,7 @@ function projectWorkspaceAgentMessagesToTimelineItems(messages) {
|
|
|
2218
2218
|
occurredAtUnixMs
|
|
2219
2219
|
});
|
|
2220
2220
|
}
|
|
2221
|
-
if (kind === "text" && role === "user") {
|
|
2221
|
+
if ((kind === "text" || kind === "session_audit") && role === "user") {
|
|
2222
2222
|
return messageTimelineItem({
|
|
2223
2223
|
message,
|
|
2224
2224
|
id,
|
|
@@ -5866,6 +5866,7 @@ function useAgentGUIActivation({
|
|
|
5866
5866
|
...input.initialContent ? { content: input.initialContent } : {},
|
|
5867
5867
|
...input.cwd !== void 0 ? { cwd: input.cwd } : {},
|
|
5868
5868
|
expiresAtUnixMs: requestedAtUnixMs + ACTIVATION_EXPIRY_MS,
|
|
5869
|
+
...input.initialTurnExpected !== void 0 ? { initialTurnExpected: input.initialTurnExpected } : {},
|
|
5869
5870
|
...input.initialDisplayPrompt ? { initialDisplayPrompt: input.initialDisplayPrompt } : {},
|
|
5870
5871
|
...input.runtimeContent ? { runtimeContent: input.runtimeContent } : {},
|
|
5871
5872
|
...input.submitDiagnostics ? { submitDiagnostics: input.submitDiagnostics } : {},
|
|
@@ -8482,7 +8483,7 @@ function useAgentGUINewConversationActivation(input) {
|
|
|
8482
8483
|
isConversationStale
|
|
8483
8484
|
} = input;
|
|
8484
8485
|
const startConversation = useCallback14(
|
|
8485
|
-
(initialContentInput, displayPrompt, submitOptions) => {
|
|
8486
|
+
(initialContentInput, displayPrompt, submitOptions, initialTurnExpected) => {
|
|
8486
8487
|
const target = selectedAgentTargetRef.current;
|
|
8487
8488
|
const targetData = selectedComposerTargetDataRef.current;
|
|
8488
8489
|
if (target.disabled === true) {
|
|
@@ -8584,6 +8585,7 @@ function useAgentGUINewConversationActivation(input) {
|
|
|
8584
8585
|
clientSubmitId: submitTrace.clientSubmitId,
|
|
8585
8586
|
cwd: selectedProjectPath ?? "",
|
|
8586
8587
|
initialContent: normalizedInitialContent,
|
|
8588
|
+
...initialTurnExpected !== void 0 ? { initialTurnExpected } : {},
|
|
8587
8589
|
initialDisplayPrompt,
|
|
8588
8590
|
runtimeContent: toRuntimeSendContent(normalizedInitialContent),
|
|
8589
8591
|
submitDiagnostics: agentSubmitTraceDiagnostics(submitTrace),
|
|
@@ -8889,6 +8891,29 @@ function resolveAgentGUIInteractionTarget(interactions, requestId) {
|
|
|
8889
8891
|
}
|
|
8890
8892
|
|
|
8891
8893
|
// agent-gui/agentGuiNode/controller/useAgentGUISubmitInteractionActions.ts
|
|
8894
|
+
function typedGoalControlFromComposer(content, _displayPrompt) {
|
|
8895
|
+
if (content.length !== 1 || content[0]?.type !== "text") {
|
|
8896
|
+
return null;
|
|
8897
|
+
}
|
|
8898
|
+
const prompt = (content[0].text ?? "").trim();
|
|
8899
|
+
const match = /^\/goal(?:\s+([\s\S]+))?$/iu.exec(prompt);
|
|
8900
|
+
const args = match?.[1]?.trim() ?? "";
|
|
8901
|
+
if (!match || !args) {
|
|
8902
|
+
return null;
|
|
8903
|
+
}
|
|
8904
|
+
switch (args.toLowerCase()) {
|
|
8905
|
+
case "clear":
|
|
8906
|
+
case "reset":
|
|
8907
|
+
return { action: "clear" };
|
|
8908
|
+
case "pause":
|
|
8909
|
+
return { action: "pause" };
|
|
8910
|
+
case "resume":
|
|
8911
|
+
case "active":
|
|
8912
|
+
return { action: "resume" };
|
|
8913
|
+
default:
|
|
8914
|
+
return { action: "set", objective: args };
|
|
8915
|
+
}
|
|
8916
|
+
}
|
|
8892
8917
|
function useAgentGUISubmitInteractionActions(input) {
|
|
8893
8918
|
const {
|
|
8894
8919
|
activation,
|
|
@@ -9099,7 +9124,7 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9099
9124
|
[activation, executePrompt, isSessionMarkedNonResumable, workspaceId]
|
|
9100
9125
|
);
|
|
9101
9126
|
const goalControl = useCallback17(
|
|
9102
|
-
(action, objective) => {
|
|
9127
|
+
(action, objective, submittedDraftScopeKey) => {
|
|
9103
9128
|
if (previewMode) {
|
|
9104
9129
|
return;
|
|
9105
9130
|
}
|
|
@@ -9107,6 +9132,13 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9107
9132
|
if (!agentSessionId) {
|
|
9108
9133
|
return;
|
|
9109
9134
|
}
|
|
9135
|
+
const submittedDraftSnapshot = submittedDraftScopeKey ? {
|
|
9136
|
+
sourceScopeKey: submittedDraftScopeKey,
|
|
9137
|
+
content: snapshotAgentComposerDraft(
|
|
9138
|
+
draftByScopeKeyRef.current[submittedDraftScopeKey] ?? emptyAgentComposerDraft()
|
|
9139
|
+
),
|
|
9140
|
+
targetAgentSessionId: agentSessionId
|
|
9141
|
+
} : null;
|
|
9110
9142
|
setDetailError(null);
|
|
9111
9143
|
void agentActivityRuntime.goalControl({
|
|
9112
9144
|
workspaceId,
|
|
@@ -9114,6 +9146,16 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9114
9146
|
action,
|
|
9115
9147
|
...objective !== void 0 ? { objective } : {}
|
|
9116
9148
|
}).then(() => {
|
|
9149
|
+
if (submittedDraftSnapshot) {
|
|
9150
|
+
setDraftByScopeKey((current) => {
|
|
9151
|
+
const next = clearSubmittedDraftIfUnchanged({
|
|
9152
|
+
drafts: current,
|
|
9153
|
+
snapshot: submittedDraftSnapshot
|
|
9154
|
+
});
|
|
9155
|
+
draftByScopeKeyRef.current = next;
|
|
9156
|
+
return next;
|
|
9157
|
+
});
|
|
9158
|
+
}
|
|
9117
9159
|
if (action !== "clear" || !isCurrentConversation(agentSessionId)) {
|
|
9118
9160
|
return;
|
|
9119
9161
|
}
|
|
@@ -9129,6 +9171,7 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9129
9171
|
agentActivityRuntime,
|
|
9130
9172
|
isCurrentConversation,
|
|
9131
9173
|
previewMode,
|
|
9174
|
+
setDraftByScopeKey,
|
|
9132
9175
|
setDetailError,
|
|
9133
9176
|
setGoalClearNoticeSequence,
|
|
9134
9177
|
workspaceId
|
|
@@ -9145,6 +9188,10 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9145
9188
|
return;
|
|
9146
9189
|
}
|
|
9147
9190
|
const displayPromptText = displayPrompt && displayPrompt.trim() ? displayPrompt : void 0;
|
|
9191
|
+
const typedGoal = typedGoalControlFromComposer(
|
|
9192
|
+
normalizedContent,
|
|
9193
|
+
displayPromptText
|
|
9194
|
+
);
|
|
9148
9195
|
if (!promptImagesSupported && agentPromptContentHasImage(normalizedContent)) {
|
|
9149
9196
|
setDetailError(translate("agentHost.agentGui.promptImagesUnsupported"));
|
|
9150
9197
|
return;
|
|
@@ -9179,6 +9226,14 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9179
9226
|
setActiveConversationId(recoveredAgentSessionId);
|
|
9180
9227
|
setIntent({ tag: "active", id: recoveredAgentSessionId });
|
|
9181
9228
|
persistActiveConversation(recoveredAgentSessionId);
|
|
9229
|
+
if (typedGoal) {
|
|
9230
|
+
goalControl(
|
|
9231
|
+
typedGoal.action,
|
|
9232
|
+
typedGoal.objective,
|
|
9233
|
+
resolveAgentComposerDraftScopeKey({})
|
|
9234
|
+
);
|
|
9235
|
+
return;
|
|
9236
|
+
}
|
|
9182
9237
|
submitExistingPrompt(
|
|
9183
9238
|
recoveredAgentSessionId,
|
|
9184
9239
|
normalizedContent,
|
|
@@ -9199,7 +9254,8 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9199
9254
|
const activationResult = startConversation(
|
|
9200
9255
|
normalizedContent,
|
|
9201
9256
|
displayPromptText,
|
|
9202
|
-
options
|
|
9257
|
+
options,
|
|
9258
|
+
typedGoal ? false : void 0
|
|
9203
9259
|
);
|
|
9204
9260
|
if (activationResult) {
|
|
9205
9261
|
draftByScopeKeyRef.current = clearSubmittedAgentGUIHomeDraft({
|
|
@@ -9217,6 +9273,14 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9217
9273
|
}
|
|
9218
9274
|
return;
|
|
9219
9275
|
}
|
|
9276
|
+
if (typedGoal) {
|
|
9277
|
+
goalControl(
|
|
9278
|
+
typedGoal.action,
|
|
9279
|
+
typedGoal.objective,
|
|
9280
|
+
resolveAgentComposerDraftScopeKey({ agentSessionId })
|
|
9281
|
+
);
|
|
9282
|
+
return;
|
|
9283
|
+
}
|
|
9220
9284
|
submitExistingPrompt(
|
|
9221
9285
|
agentSessionId,
|
|
9222
9286
|
normalizedContent,
|
|
@@ -9232,6 +9296,7 @@ function useAgentGUISubmitInteractionActions(input) {
|
|
|
9232
9296
|
conversationListQuery,
|
|
9233
9297
|
previewMode,
|
|
9234
9298
|
promptImagesSupported,
|
|
9299
|
+
goalControl,
|
|
9235
9300
|
persistActiveConversation,
|
|
9236
9301
|
startConversation,
|
|
9237
9302
|
submitExistingPrompt,
|
|
@@ -24081,6 +24146,9 @@ function AgentComposer(props) {
|
|
|
24081
24146
|
const controller = new AgentMentionSearchController({
|
|
24082
24147
|
contextMentionProviders
|
|
24083
24148
|
});
|
|
24149
|
+
controller.setProvenanceCatalog(
|
|
24150
|
+
referenceProvenanceFilter?.snapshot.catalog ?? null
|
|
24151
|
+
);
|
|
24084
24152
|
controller.setProvenanceFilter(
|
|
24085
24153
|
referenceProvenanceFilter?.snapshot.value ?? null
|
|
24086
24154
|
);
|
|
@@ -24108,10 +24176,16 @@ function AgentComposer(props) {
|
|
|
24108
24176
|
}
|
|
24109
24177
|
}, [draftContent, draftPrompt, goalDraftObjective]);
|
|
24110
24178
|
useEffect28(() => {
|
|
24179
|
+
mentionControllerRef.current?.setProvenanceCatalog(
|
|
24180
|
+
referenceProvenanceFilter?.snapshot.catalog ?? null
|
|
24181
|
+
);
|
|
24111
24182
|
mentionControllerRef.current?.setProvenanceFilter(
|
|
24112
24183
|
referenceProvenanceFilter?.snapshot.value ?? null
|
|
24113
24184
|
);
|
|
24114
|
-
}, [
|
|
24185
|
+
}, [
|
|
24186
|
+
referenceProvenanceFilter?.snapshot.catalog,
|
|
24187
|
+
referenceProvenanceFilter?.snapshot.value
|
|
24188
|
+
]);
|
|
24115
24189
|
useEffect28(() => {
|
|
24116
24190
|
if (previousSlashStatusAgentSessionIdRef.current === slashStatusAgentSessionId) {
|
|
24117
24191
|
return;
|
|
@@ -34652,4 +34726,4 @@ export {
|
|
|
34652
34726
|
resolveAgentGUIAgentTarget,
|
|
34653
34727
|
AgentGUI
|
|
34654
34728
|
};
|
|
34655
|
-
//# sourceMappingURL=chunk-
|
|
34729
|
+
//# sourceMappingURL=chunk-4HSLSSPJ.js.map
|