@rogatio/cli 5.1.0 → 5.1.1
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/editor/index.js +5 -11
- package/dist/node/index.js +6 -3
- package/package.json +1 -1
package/dist/editor/index.js
CHANGED
|
@@ -215,7 +215,7 @@ var HTTP_METHODS = Object.freeze([
|
|
|
215
215
|
]);
|
|
216
216
|
|
|
217
217
|
// packages/editor/src/ai-assist-panel.ts
|
|
218
|
-
function createAIAssistPanel(_container,
|
|
218
|
+
function createAIAssistPanel(_container, _editor, onApply, onClose) {
|
|
219
219
|
let visible = false;
|
|
220
220
|
let streamingContent = "";
|
|
221
221
|
let streamingMessageIndex = -1;
|
|
@@ -537,13 +537,6 @@ function createAIAssistPanel(_container, editor, onApply, onClose) {
|
|
|
537
537
|
function handleSend() {
|
|
538
538
|
const prompt = textarea.value.trim();
|
|
539
539
|
if (!prompt) return;
|
|
540
|
-
const _request = {
|
|
541
|
-
kind: "generate",
|
|
542
|
-
prompt,
|
|
543
|
-
context: {
|
|
544
|
-
project: editor.getDraft()
|
|
545
|
-
}
|
|
546
|
-
};
|
|
547
540
|
textarea.value = "";
|
|
548
541
|
textarea.style.height = "auto";
|
|
549
542
|
}
|
|
@@ -2586,8 +2579,8 @@ var EditorControllerImpl = class {
|
|
|
2586
2579
|
id: ruleId,
|
|
2587
2580
|
name: ruleProposal.name,
|
|
2588
2581
|
urlRegex: ruleProposal.urlRegex,
|
|
2589
|
-
origins: ruleProposal.origins
|
|
2590
|
-
resourceTypes: ruleProposal.resourceTypes
|
|
2582
|
+
origins: ruleProposal.origins ? [...ruleProposal.origins] : [],
|
|
2583
|
+
resourceTypes: ruleProposal.resourceTypes ? [...ruleProposal.resourceTypes] : ["main_frame"],
|
|
2591
2584
|
priority: ruleProposal.priority ?? 100
|
|
2592
2585
|
};
|
|
2593
2586
|
if (ruleProposal.method) {
|
|
@@ -2597,9 +2590,10 @@ var EditorControllerImpl = class {
|
|
|
2597
2590
|
rule[actionField] = ruleProposal.action;
|
|
2598
2591
|
group.rules.push(rule);
|
|
2599
2592
|
this.markChanged();
|
|
2593
|
+
const groupIdStr = String(group.id);
|
|
2600
2594
|
this.focusRequest = pointer(
|
|
2601
2595
|
"groups",
|
|
2602
|
-
this.groupIndex(
|
|
2596
|
+
this.groupIndex(groupIdStr),
|
|
2603
2597
|
"rules",
|
|
2604
2598
|
group.rules.length - 1,
|
|
2605
2599
|
"name"
|
package/dist/node/index.js
CHANGED
|
@@ -1690,7 +1690,10 @@ var ENVELOPE_MESSAGE_TYPES = /* @__PURE__ */ new Set([
|
|
|
1690
1690
|
"authorize.response",
|
|
1691
1691
|
"mock.connect",
|
|
1692
1692
|
"mock.request",
|
|
1693
|
-
"mock.response"
|
|
1693
|
+
"mock.response",
|
|
1694
|
+
"ai.complete",
|
|
1695
|
+
"ai.stream.chunk",
|
|
1696
|
+
"ai.error"
|
|
1694
1697
|
]);
|
|
1695
1698
|
var EnvelopeError = class extends Error {
|
|
1696
1699
|
constructor(message) {
|
|
@@ -2242,7 +2245,7 @@ function createNativeRuntimeController(options) {
|
|
|
2242
2245
|
const meta = input.metadata;
|
|
2243
2246
|
try {
|
|
2244
2247
|
const result = await aiClient.complete({
|
|
2245
|
-
messages: meta.messages,
|
|
2248
|
+
messages: [...meta.messages],
|
|
2246
2249
|
model: meta.model,
|
|
2247
2250
|
temperature: meta.temperature,
|
|
2248
2251
|
responseFormat: meta.responseFormat
|
|
@@ -2288,7 +2291,7 @@ function createNativeRuntimeController(options) {
|
|
|
2288
2291
|
const meta = input.metadata;
|
|
2289
2292
|
try {
|
|
2290
2293
|
for await (const chunk of aiClient.stream({
|
|
2291
|
-
messages: meta.messages,
|
|
2294
|
+
messages: [...meta.messages],
|
|
2292
2295
|
model: meta.model,
|
|
2293
2296
|
temperature: meta.temperature
|
|
2294
2297
|
})) {
|
package/package.json
CHANGED