@aglyn/plugins-ai 1.0.0-beta.277 → 1.0.0-beta.282
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/package.json +17 -17
- package/src/lib/activity/ai-activity-actions.d.ts +2 -26
- package/src/lib/activity/ai-activity-actions.js +5 -42
- package/src/lib/activity/ai-activity-actions.js.map +1 -1
- package/src/lib/activity/ai-activity-words.d.ts +42 -0
- package/src/lib/activity/ai-activity-words.js +63 -0
- package/src/lib/activity/ai-activity-words.js.map +1 -0
- package/src/lib/components/ai-insight-card.component.d.ts +2 -6
- package/src/lib/components/ai-insight-card.component.js +2 -6
- package/src/lib/components/ai-insight-card.component.js.map +1 -1
- package/src/lib/components/ai-insight-dialog.component.js +22 -32
- package/src/lib/components/ai-insight-dialog.component.js.map +1 -1
- package/src/lib/components/ai-job-links.js +15 -0
- package/src/lib/components/ai-job-links.js.map +1 -1
- package/src/lib/components/assist-panel.component.js +3 -1
- package/src/lib/components/assist-panel.component.js.map +1 -1
- package/src/lib/jobs/ai-build-capabilities.js +23 -0
- package/src/lib/jobs/ai-build-capabilities.js.map +1 -1
- package/src/lib/jobs/ai-job-build-step.js +2 -1
- package/src/lib/jobs/ai-job-build-step.js.map +1 -1
- package/src/lib/jobs/ai-job-import-step.d.ts +1 -0
- package/src/lib/jobs/ai-job-import-step.js +17 -11
- package/src/lib/jobs/ai-job-import-step.js.map +1 -1
- package/src/lib/jobs/ai-job-plan-step.js +3 -2
- package/src/lib/jobs/ai-job-plan-step.js.map +1 -1
- package/src/lib/jobs/ai-job-privacy-step.d.ts +184 -0
- package/src/lib/jobs/ai-job-privacy-step.js +471 -0
- package/src/lib/jobs/ai-job-privacy-step.js.map +1 -0
- package/src/lib/jobs/ai-site-inspiration.d.ts +10 -0
- package/src/lib/jobs/ai-site-inspiration.js +15 -0
- package/src/lib/jobs/ai-site-inspiration.js.map +1 -1
- package/src/lib/model/ai-insight-ask.d.ts +57 -0
- package/src/lib/model/ai-insight-ask.js +64 -0
- package/src/lib/model/ai-insight-ask.js.map +1 -0
- package/src/lib/model/ai-insight.d.ts +1 -6
- package/src/lib/model/ai-insight.js +2 -8
- package/src/lib/model/ai-insight.js.map +1 -1
- package/src/lib/model/ai-job-activity.js +1 -0
- package/src/lib/model/ai-job-activity.js.map +1 -1
- package/src/lib/model/ai-jobs.types.d.ts +5 -1
- package/src/lib/model/ai-jobs.types.js +1 -0
- package/src/lib/model/ai-jobs.types.js.map +1 -1
- package/src/lib/model/ai-permissions.js +6 -2
- package/src/lib/model/ai-permissions.js.map +1 -1
- package/src/lib/model/ai-site-import.d.ts +2 -0
- package/src/lib/model/ai-site-import.js +2 -0
- package/src/lib/model/ai-site-import.js.map +1 -1
- package/src/lib/model/ai-site-kinds.d.ts +10 -28
- package/src/lib/model/ai-site-kinds.js +12 -496
- package/src/lib/model/ai-site-kinds.js.map +1 -1
- package/src/lib/providers/anthropic.js +23 -14
- package/src/lib/providers/anthropic.js.map +1 -1
- package/src/lib/providers/contract.d.ts +39 -4
- package/src/lib/providers/contract.js +28 -0
- package/src/lib/providers/contract.js.map +1 -1
- package/src/lib/providers/routing.d.ts +3 -0
- package/src/lib/providers/routing.js +4 -3
- package/src/lib/providers/routing.js.map +1 -1
- package/src/lib/runtime/ai-dev-env.d.ts +3 -2
- package/src/lib/runtime/ai-dev-env.js +3 -2
- package/src/lib/runtime/ai-dev-env.js.map +1 -1
- package/src/lib/runtime/ai-page-links.d.ts +5 -2
- package/src/lib/runtime/ai-page-links.js +11 -3
- package/src/lib/runtime/ai-page-links.js.map +1 -1
- package/src/lib/runtime/ai-runtime.js +5 -2
- package/src/lib/runtime/ai-runtime.js.map +1 -1
- package/src/lib/server/assist-chat.js +58 -30
- package/src/lib/server/assist-chat.js.map +1 -1
- package/src/lib/server.js +2 -0
- package/src/lib/server.js.map +1 -1
- package/src/lib/site-import/fixtures/site-import-crawl-recordings.d.ts +3 -1
- package/src/lib/site-import/fixtures/site-import-crawl-recordings.js +19 -1
- package/src/lib/site-import/fixtures/site-import-crawl-recordings.js.map +1 -1
- package/src/lib/site-import/site-import-page.d.ts +2 -2
- package/src/lib/site-import/site-import-page.js +11 -1
- package/src/lib/site-import/site-import-page.js.map +1 -1
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { _ as _async_iterator } from "@swc/helpers/_/_async_iterator";
|
|
1
2
|
import { _ as _extends } from "@swc/helpers/_/_extends";
|
|
2
3
|
/**
|
|
3
4
|
* @license
|
|
@@ -1357,38 +1358,65 @@ async function handler(request) {
|
|
|
1357
1358
|
try {
|
|
1358
1359
|
var _ref, _ref1, _ref2, _ref3;
|
|
1359
1360
|
var _guide_view, _describeView, _body_context;
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
if (
|
|
1365
|
-
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1361
|
+
{
|
|
1362
|
+
var _iteratorAbruptCompletion = false, _didIteratorError = false, _iteratorError, _return;
|
|
1363
|
+
try {
|
|
1364
|
+
var _iterator = _async_iterator(upstream);
|
|
1365
|
+
if (_iterator === null || typeof _iterator !== "object" && typeof _iterator !== "function") throw new TypeError("Iterator result is not an object");
|
|
1366
|
+
for(var _next = _iterator.next, _step;; _iteratorAbruptCompletion = false){
|
|
1367
|
+
_step = await Reflect.apply(_next, _iterator, []);
|
|
1368
|
+
if (_step === null || typeof _step !== "object" && typeof _step !== "function") throw new TypeError("Iterator result is not an object");
|
|
1369
|
+
_iteratorAbruptCompletion = !_step.done;
|
|
1370
|
+
if (!_iteratorAbruptCompletion) break;
|
|
1371
|
+
let _value = _step.value;
|
|
1372
|
+
const event = _value;
|
|
1373
|
+
if (event.type === 'delta') {
|
|
1374
|
+
raw += event.text;
|
|
1375
|
+
const visible = visibleAssistText(raw);
|
|
1376
|
+
if (visible.length > emitted) {
|
|
1377
|
+
emit({
|
|
1378
|
+
type: 'delta',
|
|
1379
|
+
text: visible.slice(emitted)
|
|
1380
|
+
});
|
|
1381
|
+
emitted = visible.length;
|
|
1382
|
+
}
|
|
1383
|
+
} else if (event.type === 'error') {
|
|
1384
|
+
// The provider's own words stayed in the log (AGL-2815); the
|
|
1385
|
+
// reader gets the fixed sentence for the verdict.
|
|
1386
|
+
emit({
|
|
1387
|
+
type: 'error',
|
|
1388
|
+
error: upstreamFailureCopy(event.retryable)
|
|
1389
|
+
});
|
|
1390
|
+
} else if (event.type === 'tool') {
|
|
1391
|
+
// The first call only: the tool is offered once per message,
|
|
1392
|
+
// and a second call is the model repeating itself.
|
|
1393
|
+
if (editRung && !editInput && event.name === ASSIST_EDIT_TOOL_NAME) {
|
|
1394
|
+
editInput = event.input;
|
|
1395
|
+
}
|
|
1396
|
+
if (buildRung && !buildInput && event.name === ASSIST_BUILD_TOOL_NAME) {
|
|
1397
|
+
buildInput = event.input;
|
|
1398
|
+
}
|
|
1399
|
+
} else if (event.type === 'done') {
|
|
1400
|
+
var _event_rawOutput;
|
|
1401
|
+
usage = event.usage;
|
|
1402
|
+
stopReason = event.stopReason;
|
|
1403
|
+
rawOutput = (_event_rawOutput = event.rawOutput) != null ? _event_rawOutput : null;
|
|
1404
|
+
}
|
|
1370
1405
|
}
|
|
1371
|
-
}
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
if (buildRung && !buildInput && event.name === ASSIST_BUILD_TOOL_NAME) {
|
|
1385
|
-
buildInput = event.input;
|
|
1406
|
+
} catch (err) {
|
|
1407
|
+
_didIteratorError = true;
|
|
1408
|
+
_iteratorError = err;
|
|
1409
|
+
} finally{
|
|
1410
|
+
try {
|
|
1411
|
+
if (_iteratorAbruptCompletion && (_return = _iterator.return) != null) {
|
|
1412
|
+
_step = await Reflect.apply(_return, _iterator, []);
|
|
1413
|
+
if (_step === null || typeof _step !== "object" && typeof _step !== "function") throw new TypeError("Iterator result is not an object");
|
|
1414
|
+
}
|
|
1415
|
+
} finally{
|
|
1416
|
+
if (_didIteratorError) {
|
|
1417
|
+
throw _iteratorError;
|
|
1418
|
+
}
|
|
1386
1419
|
}
|
|
1387
|
-
} else if (event.type === 'done') {
|
|
1388
|
-
var _event_rawOutput;
|
|
1389
|
-
usage = event.usage;
|
|
1390
|
-
stopReason = event.stopReason;
|
|
1391
|
-
rawOutput = (_event_rawOutput = event.rawOutput) != null ? _event_rawOutput : null;
|
|
1392
1420
|
}
|
|
1393
1421
|
}
|
|
1394
1422
|
// End of stream: the fence ambiguity is resolved, so flush the
|