@genesislcap/ai-assistant 14.432.1-FUI-2489.1 → 14.432.2
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/api-extractor.json +2 -2
- package/dist/dts/components/popout-manager/popout-manager.d.ts.map +1 -1
- package/dist/dts/suggestions/chat-suggestions.d.ts.map +1 -1
- package/dist/dts/tags/index.d.ts +0 -1
- package/dist/dts/tags/index.d.ts.map +1 -1
- package/dist/esm/components/chat-driver/chat-driver.js +2 -2
- package/dist/esm/components/orchestrating-driver/orchestrating-driver.js +4 -4
- package/dist/esm/components/popout-manager/popout-manager.js +0 -1
- package/dist/esm/suggestions/chat-suggestions.js +2 -1
- package/dist/esm/tags/index.js +0 -1
- package/package.json +16 -16
- package/src/components/chat-driver/chat-driver.ts +2 -2
- package/src/components/orchestrating-driver/orchestrating-driver.ts +4 -4
- package/src/components/popout-manager/popout-manager.ts +0 -1
- package/src/suggestions/chat-suggestions.ts +2 -9
- package/src/tags/index.ts +0 -1
- package/tsconfig.json +3 -1
package/api-extractor.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
|
|
3
|
+
"extends": "../../../../api-extractor.json"
|
|
4
4
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"popout-manager.d.ts","sourceRoot":"","sources":["../../../../src/components/popout-manager/popout-manager.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,cAAc,EAAoB,MAAM,uBAAuB,CAAC;AAGxF;;;;;GAKG;AACH,MAAM,WAAW,cAAc;IAC7B;;;;OAIG;IACH,MAAM,CAAC,OAAO,EAAE,WAAW,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC5C,qEAAqE;IACrE,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IAC1B;;;;OAIG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":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"chat-suggestions.d.ts","sourceRoot":"","sources":["../../../src/suggestions/chat-suggestions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AA+I3D,qBAKa,eAAgB,SAAQ,cAAc;IAEjD,KAAK,EAAE,gBAAgB,CAAsB;IAE7C,qBAAqB,CAAC,UAAU,EAAE,MAAM,GAAG,IAAI;CAGhD"}
|
package/dist/dts/tags/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tags/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/tags/index.ts"],"names":[],"mappings":""}
|
|
@@ -496,7 +496,6 @@ export class ChatDriver extends EventTarget {
|
|
|
496
496
|
// `iterations` because fold operations decrement iterations, which would incorrectly
|
|
497
497
|
// re-trigger the slice on subsequent calls after a fold open/close.
|
|
498
498
|
let firstLlmCall = !!currentInput;
|
|
499
|
-
/* oxlint-disable no-await-in-loop -- tool loop: each iteration depends on prior model response */
|
|
500
499
|
while (iterations < this.maxToolIterations) {
|
|
501
500
|
iterations += 1;
|
|
502
501
|
const foldSuffix = this.buildFoldSystemPromptSuffix();
|
|
@@ -523,6 +522,7 @@ export class ChatDriver extends EventTarget {
|
|
|
523
522
|
};
|
|
524
523
|
let response;
|
|
525
524
|
try {
|
|
525
|
+
// eslint-disable-next-line no-await-in-loop
|
|
526
526
|
response = yield this.aiProvider.chat(historyForCall, currentInput, options);
|
|
527
527
|
}
|
|
528
528
|
catch (e) {
|
|
@@ -581,6 +581,7 @@ export class ChatDriver extends EventTarget {
|
|
|
581
581
|
let anyRealToolExecuted = false;
|
|
582
582
|
let hitUnknownToolLimit = false;
|
|
583
583
|
if (toolCalls.length > 0) {
|
|
584
|
+
// eslint-disable-next-line no-await-in-loop
|
|
584
585
|
yield Promise.all(toolCalls.map((tc) => __awaiter(this, void 0, void 0, function* () {
|
|
585
586
|
// Check for fold facade
|
|
586
587
|
const fold = this.getFold(tc.name);
|
|
@@ -740,7 +741,6 @@ export class ChatDriver extends EventTarget {
|
|
|
740
741
|
}
|
|
741
742
|
currentInput = '';
|
|
742
743
|
}
|
|
743
|
-
/* oxlint-enable no-await-in-loop */
|
|
744
744
|
if (iterations >= this.maxToolIterations) {
|
|
745
745
|
logger.warn('ChatDriver: reached max tool iterations, stopping');
|
|
746
746
|
this.appendToHistory({
|
|
@@ -119,11 +119,11 @@ export class OrchestratingDriver extends EventTarget {
|
|
|
119
119
|
const contextPrimer = handoffSummary
|
|
120
120
|
? [{ role: 'user', content: `[Context from previous agent]: ${handoffSummary}` }]
|
|
121
121
|
: [];
|
|
122
|
-
//
|
|
122
|
+
// eslint-disable-next-line no-await-in-loop
|
|
123
123
|
result = yield this.chatDriver.continueFromHistory(contextPrimer);
|
|
124
124
|
}
|
|
125
125
|
else {
|
|
126
|
-
//
|
|
126
|
+
// eslint-disable-next-line no-await-in-loop
|
|
127
127
|
result = yield this.chatDriver.sendMessage(input, attachments);
|
|
128
128
|
}
|
|
129
129
|
if (result.reason !== 'agent-handoff' || isFallback(currentAgent)) {
|
|
@@ -139,7 +139,7 @@ export class OrchestratingDriver extends EventTarget {
|
|
|
139
139
|
isHandoff = true;
|
|
140
140
|
const updatedHistory = this.chatDriver.getHistory();
|
|
141
141
|
this.dispatchEvent(new CustomEvent('orchestrating-start'));
|
|
142
|
-
//
|
|
142
|
+
// eslint-disable-next-line no-await-in-loop
|
|
143
143
|
currentAgent = yield this.classify(remainingTask, updatedHistory);
|
|
144
144
|
}
|
|
145
145
|
return { reason: 'done' };
|
|
@@ -205,7 +205,7 @@ export class OrchestratingDriver extends EventTarget {
|
|
|
205
205
|
systemPrompt: classifierPrompt,
|
|
206
206
|
tools: [routingTool],
|
|
207
207
|
};
|
|
208
|
-
//
|
|
208
|
+
// eslint-disable-next-line no-await-in-loop
|
|
209
209
|
const response = yield this.aiProvider.chat([], input, options);
|
|
210
210
|
const tc = (_b = response.toolCalls) === null || _b === void 0 ? void 0 : _b[0];
|
|
211
211
|
const index = (tc === null || tc === void 0 ? void 0 : tc.name) === 'select_agent' ? tc.args.agent_index : -1;
|
|
@@ -35,7 +35,6 @@ let FoundationAiPopoutManager = class FoundationAiPopoutManager extends GenesisE
|
|
|
35
35
|
}
|
|
36
36
|
connectedCallback() {
|
|
37
37
|
super.connectedCallback();
|
|
38
|
-
// oxlint-disable-next-line typescript-eslint(no-this-alias) -- module-level singleton, not a local alias
|
|
39
38
|
_aiPopoutManager = this;
|
|
40
39
|
const bubble = this.querySelector('foundation-ai-chat-bubble');
|
|
41
40
|
const assistantEl = bubble === null || bubble === void 0 ? void 0 : bubble.querySelector('[slot="dialog-content"]');
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { __decorate } from "tslib";
|
|
2
|
-
import { customElement,
|
|
2
|
+
import { customElement, observable, html, css, repeat, when } from '@genesislcap/web-core';
|
|
3
|
+
import { GenesisElement } from '@genesislcap/web-core';
|
|
3
4
|
const PILL_ANIMATION_STAGGER_MS = 70;
|
|
4
5
|
const template = html `
|
|
5
6
|
${when((x) => x.state.status === 'loading', html `
|
package/dist/esm/tags/index.js
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@genesislcap/ai-assistant",
|
|
3
3
|
"description": "Genesis AI Assistant micro-frontend",
|
|
4
|
-
"version": "14.432.
|
|
4
|
+
"version": "14.432.2",
|
|
5
5
|
"license": "SEE LICENSE IN license.txt",
|
|
6
6
|
"main": "dist/esm/index.js",
|
|
7
7
|
"types": "dist/ai-assistant.d.ts",
|
|
@@ -64,24 +64,24 @@
|
|
|
64
64
|
}
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
|
-
"@genesislcap/foundation-testing": "14.432.
|
|
68
|
-
"@genesislcap/genx": "14.432.
|
|
69
|
-
"@genesislcap/rollup-builder": "14.432.
|
|
70
|
-
"@genesislcap/ts-builder": "14.432.
|
|
71
|
-
"@genesislcap/uvu-playwright-builder": "14.432.
|
|
72
|
-
"@genesislcap/vite-builder": "14.432.
|
|
73
|
-
"@genesislcap/webpack-builder": "14.432.
|
|
67
|
+
"@genesislcap/foundation-testing": "14.432.2",
|
|
68
|
+
"@genesislcap/genx": "14.432.2",
|
|
69
|
+
"@genesislcap/rollup-builder": "14.432.2",
|
|
70
|
+
"@genesislcap/ts-builder": "14.432.2",
|
|
71
|
+
"@genesislcap/uvu-playwright-builder": "14.432.2",
|
|
72
|
+
"@genesislcap/vite-builder": "14.432.2",
|
|
73
|
+
"@genesislcap/webpack-builder": "14.432.2",
|
|
74
74
|
"@types/dompurify": "^3.0.5",
|
|
75
75
|
"@types/marked": "^5.0.2"
|
|
76
76
|
},
|
|
77
77
|
"dependencies": {
|
|
78
|
-
"@genesislcap/foundation-ai": "14.432.
|
|
79
|
-
"@genesislcap/foundation-logger": "14.432.
|
|
80
|
-
"@genesislcap/foundation-redux": "14.432.
|
|
81
|
-
"@genesislcap/foundation-ui": "14.432.
|
|
82
|
-
"@genesislcap/foundation-utils": "14.432.
|
|
83
|
-
"@genesislcap/rapid-design-system": "14.432.
|
|
84
|
-
"@genesislcap/web-core": "14.432.
|
|
78
|
+
"@genesislcap/foundation-ai": "14.432.2",
|
|
79
|
+
"@genesislcap/foundation-logger": "14.432.2",
|
|
80
|
+
"@genesislcap/foundation-redux": "14.432.2",
|
|
81
|
+
"@genesislcap/foundation-ui": "14.432.2",
|
|
82
|
+
"@genesislcap/foundation-utils": "14.432.2",
|
|
83
|
+
"@genesislcap/rapid-design-system": "14.432.2",
|
|
84
|
+
"@genesislcap/web-core": "14.432.2",
|
|
85
85
|
"dompurify": "^3.3.1",
|
|
86
86
|
"marked": "^17.0.3"
|
|
87
87
|
},
|
|
@@ -93,5 +93,5 @@
|
|
|
93
93
|
"publishConfig": {
|
|
94
94
|
"access": "public"
|
|
95
95
|
},
|
|
96
|
-
"gitHead": "
|
|
96
|
+
"gitHead": "a93cc1972a01671997a744f7ce0477ca5809006d"
|
|
97
97
|
}
|
|
@@ -628,7 +628,6 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
628
628
|
// re-trigger the slice on subsequent calls after a fold open/close.
|
|
629
629
|
let firstLlmCall = !!currentInput;
|
|
630
630
|
|
|
631
|
-
/* oxlint-disable no-await-in-loop -- tool loop: each iteration depends on prior model response */
|
|
632
631
|
while (iterations < this.maxToolIterations) {
|
|
633
632
|
iterations += 1;
|
|
634
633
|
|
|
@@ -661,6 +660,7 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
661
660
|
|
|
662
661
|
let response: ChatMessage;
|
|
663
662
|
try {
|
|
663
|
+
// eslint-disable-next-line no-await-in-loop
|
|
664
664
|
response = await this.aiProvider.chat!(historyForCall, currentInput, options);
|
|
665
665
|
} catch (e) {
|
|
666
666
|
if (e instanceof MalformedFunctionCallError) {
|
|
@@ -732,6 +732,7 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
732
732
|
let hitUnknownToolLimit = false;
|
|
733
733
|
|
|
734
734
|
if (toolCalls.length > 0) {
|
|
735
|
+
// eslint-disable-next-line no-await-in-loop
|
|
735
736
|
await Promise.all(
|
|
736
737
|
toolCalls.map(async (tc) => {
|
|
737
738
|
// Check for fold facade
|
|
@@ -920,7 +921,6 @@ export class ChatDriver extends EventTarget implements AiDriver {
|
|
|
920
921
|
|
|
921
922
|
currentInput = '';
|
|
922
923
|
}
|
|
923
|
-
/* oxlint-enable no-await-in-loop */
|
|
924
924
|
|
|
925
925
|
if (iterations >= this.maxToolIterations) {
|
|
926
926
|
logger.warn('ChatDriver: reached max tool iterations, stopping');
|
|
@@ -182,10 +182,10 @@ export class OrchestratingDriver extends EventTarget implements AiDriver {
|
|
|
182
182
|
const contextPrimer: ChatMessage[] = handoffSummary
|
|
183
183
|
? [{ role: 'user', content: `[Context from previous agent]: ${handoffSummary}` }]
|
|
184
184
|
: [];
|
|
185
|
-
//
|
|
185
|
+
// eslint-disable-next-line no-await-in-loop
|
|
186
186
|
result = await this.chatDriver.continueFromHistory(contextPrimer);
|
|
187
187
|
} else {
|
|
188
|
-
//
|
|
188
|
+
// eslint-disable-next-line no-await-in-loop
|
|
189
189
|
result = await this.chatDriver.sendMessage(input, attachments);
|
|
190
190
|
}
|
|
191
191
|
|
|
@@ -207,7 +207,7 @@ export class OrchestratingDriver extends EventTarget implements AiDriver {
|
|
|
207
207
|
|
|
208
208
|
const updatedHistory = this.chatDriver.getHistory() as ChatMessage[];
|
|
209
209
|
this.dispatchEvent(new CustomEvent('orchestrating-start'));
|
|
210
|
-
//
|
|
210
|
+
// eslint-disable-next-line no-await-in-loop
|
|
211
211
|
currentAgent = await this.classify(remainingTask, updatedHistory);
|
|
212
212
|
}
|
|
213
213
|
|
|
@@ -287,7 +287,7 @@ export class OrchestratingDriver extends EventTarget implements AiDriver {
|
|
|
287
287
|
systemPrompt: classifierPrompt,
|
|
288
288
|
tools: [routingTool],
|
|
289
289
|
};
|
|
290
|
-
//
|
|
290
|
+
// eslint-disable-next-line no-await-in-loop
|
|
291
291
|
const response = await this.aiProvider.chat!([], input, options);
|
|
292
292
|
const tc = response.toolCalls?.[0];
|
|
293
293
|
const index = tc?.name === 'select_agent' ? (tc.args.agent_index as number) : -1;
|
|
@@ -64,7 +64,6 @@ export class FoundationAiPopoutManager extends GenesisElement {
|
|
|
64
64
|
|
|
65
65
|
connectedCallback() {
|
|
66
66
|
super.connectedCallback();
|
|
67
|
-
// oxlint-disable-next-line typescript-eslint(no-this-alias) -- module-level singleton, not a local alias
|
|
68
67
|
_aiPopoutManager = this;
|
|
69
68
|
|
|
70
69
|
const bubble = this.querySelector('foundation-ai-chat-bubble');
|
|
@@ -1,12 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
3
|
-
GenesisElement,
|
|
4
|
-
observable,
|
|
5
|
-
html,
|
|
6
|
-
css,
|
|
7
|
-
repeat,
|
|
8
|
-
when,
|
|
9
|
-
} from '@genesislcap/web-core';
|
|
1
|
+
import { customElement, observable, html, css, repeat, when } from '@genesislcap/web-core';
|
|
2
|
+
import { GenesisElement } from '@genesislcap/web-core';
|
|
10
3
|
import type { SuggestionsState } from '../main/main.types';
|
|
11
4
|
|
|
12
5
|
type LoadedState = { status: 'loaded'; suggestions: string[] };
|
package/src/tags/index.ts
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|