@rama_nigg/open-cursor 2.3.12 → 2.3.14
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/index.js +20 -8
- package/dist/plugin-entry.js +10 -4
- package/package.json +1 -1
- package/src/streaming/ai-sdk-parts.ts +12 -6
- package/src/streaming/openai-sse.ts +12 -6
- package/src/streaming/types.ts +1 -0
package/dist/index.js
CHANGED
|
@@ -13364,9 +13364,12 @@ class StreamToSseConverter {
|
|
|
13364
13364
|
if (isAssistantText(event)) {
|
|
13365
13365
|
const isPartial = typeof event.timestamp_ms === "number";
|
|
13366
13366
|
if (isPartial) {
|
|
13367
|
-
this.sawAssistantPartials = true;
|
|
13368
13367
|
const text = extractText(event);
|
|
13369
|
-
|
|
13368
|
+
if (text) {
|
|
13369
|
+
this.sawAssistantPartials = true;
|
|
13370
|
+
return [this.chunkWith({ content: text })];
|
|
13371
|
+
}
|
|
13372
|
+
return [];
|
|
13370
13373
|
}
|
|
13371
13374
|
if (this.sawAssistantPartials) {
|
|
13372
13375
|
return [];
|
|
@@ -13377,9 +13380,12 @@ class StreamToSseConverter {
|
|
|
13377
13380
|
if (isThinking(event)) {
|
|
13378
13381
|
const isPartial = typeof event.timestamp_ms === "number";
|
|
13379
13382
|
if (isPartial) {
|
|
13380
|
-
this.sawThinkingPartials = true;
|
|
13381
13383
|
const text = extractThinking(event);
|
|
13382
|
-
|
|
13384
|
+
if (text) {
|
|
13385
|
+
this.sawThinkingPartials = true;
|
|
13386
|
+
return [this.chunkWith({ reasoning_content: text })];
|
|
13387
|
+
}
|
|
13388
|
+
return [];
|
|
13383
13389
|
}
|
|
13384
13390
|
if (this.sawThinkingPartials) {
|
|
13385
13391
|
return [];
|
|
@@ -19884,9 +19890,12 @@ class StreamToAiSdkParts {
|
|
|
19884
19890
|
if (isAssistantText(event)) {
|
|
19885
19891
|
const isPartial = typeof event.timestamp_ms === "number";
|
|
19886
19892
|
if (isPartial) {
|
|
19887
|
-
this.sawAssistantPartials = true;
|
|
19888
19893
|
const text = extractText(event);
|
|
19889
|
-
|
|
19894
|
+
if (text) {
|
|
19895
|
+
this.sawAssistantPartials = true;
|
|
19896
|
+
return [{ type: "text-delta", textDelta: text }];
|
|
19897
|
+
}
|
|
19898
|
+
return [];
|
|
19890
19899
|
}
|
|
19891
19900
|
if (this.sawAssistantPartials) {
|
|
19892
19901
|
return [];
|
|
@@ -19897,9 +19906,12 @@ class StreamToAiSdkParts {
|
|
|
19897
19906
|
if (isThinking(event)) {
|
|
19898
19907
|
const isPartial = typeof event.timestamp_ms === "number";
|
|
19899
19908
|
if (isPartial) {
|
|
19900
|
-
this.sawThinkingPartials = true;
|
|
19901
19909
|
const text = extractThinking(event);
|
|
19902
|
-
|
|
19910
|
+
if (text) {
|
|
19911
|
+
this.sawThinkingPartials = true;
|
|
19912
|
+
return [{ type: "text-delta", textDelta: text }];
|
|
19913
|
+
}
|
|
19914
|
+
return [];
|
|
19903
19915
|
}
|
|
19904
19916
|
if (this.sawThinkingPartials) {
|
|
19905
19917
|
return [];
|
package/dist/plugin-entry.js
CHANGED
|
@@ -13364,9 +13364,12 @@ class StreamToSseConverter {
|
|
|
13364
13364
|
if (isAssistantText(event)) {
|
|
13365
13365
|
const isPartial = typeof event.timestamp_ms === "number";
|
|
13366
13366
|
if (isPartial) {
|
|
13367
|
-
this.sawAssistantPartials = true;
|
|
13368
13367
|
const text = extractText(event);
|
|
13369
|
-
|
|
13368
|
+
if (text) {
|
|
13369
|
+
this.sawAssistantPartials = true;
|
|
13370
|
+
return [this.chunkWith({ content: text })];
|
|
13371
|
+
}
|
|
13372
|
+
return [];
|
|
13370
13373
|
}
|
|
13371
13374
|
if (this.sawAssistantPartials) {
|
|
13372
13375
|
return [];
|
|
@@ -13377,9 +13380,12 @@ class StreamToSseConverter {
|
|
|
13377
13380
|
if (isThinking(event)) {
|
|
13378
13381
|
const isPartial = typeof event.timestamp_ms === "number";
|
|
13379
13382
|
if (isPartial) {
|
|
13380
|
-
this.sawThinkingPartials = true;
|
|
13381
13383
|
const text = extractThinking(event);
|
|
13382
|
-
|
|
13384
|
+
if (text) {
|
|
13385
|
+
this.sawThinkingPartials = true;
|
|
13386
|
+
return [this.chunkWith({ reasoning_content: text })];
|
|
13387
|
+
}
|
|
13388
|
+
return [];
|
|
13383
13389
|
}
|
|
13384
13390
|
if (this.sawThinkingPartials) {
|
|
13385
13391
|
return [];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rama_nigg/open-cursor",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.14",
|
|
4
4
|
"description": "No prompt limits. No broken streams. Full thinking + tool support. Your Cursor subscription, properly integrated.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/plugin-entry.js",
|
|
@@ -42,11 +42,14 @@ export class StreamToAiSdkParts {
|
|
|
42
42
|
|
|
43
43
|
handleEvent(event: StreamJsonEvent): AiSdkStreamPart[] {
|
|
44
44
|
if (isAssistantText(event)) {
|
|
45
|
-
const isPartial = typeof
|
|
45
|
+
const isPartial = typeof event.timestamp_ms === "number";
|
|
46
46
|
if (isPartial) {
|
|
47
|
-
this.sawAssistantPartials = true;
|
|
48
47
|
const text = extractText(event);
|
|
49
|
-
|
|
48
|
+
if (text) {
|
|
49
|
+
this.sawAssistantPartials = true;
|
|
50
|
+
return [{ type: "text-delta", textDelta: text }];
|
|
51
|
+
}
|
|
52
|
+
return [];
|
|
50
53
|
}
|
|
51
54
|
if (this.sawAssistantPartials) {
|
|
52
55
|
return [];
|
|
@@ -56,11 +59,14 @@ export class StreamToAiSdkParts {
|
|
|
56
59
|
}
|
|
57
60
|
|
|
58
61
|
if (isThinking(event)) {
|
|
59
|
-
const isPartial = typeof
|
|
62
|
+
const isPartial = typeof event.timestamp_ms === "number";
|
|
60
63
|
if (isPartial) {
|
|
61
|
-
this.sawThinkingPartials = true;
|
|
62
64
|
const text = extractThinking(event);
|
|
63
|
-
|
|
65
|
+
if (text) {
|
|
66
|
+
this.sawThinkingPartials = true;
|
|
67
|
+
return [{ type: "text-delta", textDelta: text }];
|
|
68
|
+
}
|
|
69
|
+
return [];
|
|
64
70
|
}
|
|
65
71
|
if (this.sawThinkingPartials) {
|
|
66
72
|
return [];
|
|
@@ -75,11 +75,14 @@ export class StreamToSseConverter {
|
|
|
75
75
|
|
|
76
76
|
handleEvent(event: StreamJsonEvent): string[] {
|
|
77
77
|
if (isAssistantText(event)) {
|
|
78
|
-
const isPartial = typeof
|
|
78
|
+
const isPartial = typeof event.timestamp_ms === "number";
|
|
79
79
|
if (isPartial) {
|
|
80
|
-
this.sawAssistantPartials = true;
|
|
81
80
|
const text = extractText(event);
|
|
82
|
-
|
|
81
|
+
if (text) {
|
|
82
|
+
this.sawAssistantPartials = true;
|
|
83
|
+
return [this.chunkWith({ content: text })];
|
|
84
|
+
}
|
|
85
|
+
return [];
|
|
83
86
|
}
|
|
84
87
|
if (this.sawAssistantPartials) {
|
|
85
88
|
return [];
|
|
@@ -89,11 +92,14 @@ export class StreamToSseConverter {
|
|
|
89
92
|
}
|
|
90
93
|
|
|
91
94
|
if (isThinking(event)) {
|
|
92
|
-
const isPartial = typeof
|
|
95
|
+
const isPartial = typeof event.timestamp_ms === "number";
|
|
93
96
|
if (isPartial) {
|
|
94
|
-
this.sawThinkingPartials = true;
|
|
95
97
|
const text = extractThinking(event);
|
|
96
|
-
|
|
98
|
+
if (text) {
|
|
99
|
+
this.sawThinkingPartials = true;
|
|
100
|
+
return [this.chunkWith({ reasoning_content: text })];
|
|
101
|
+
}
|
|
102
|
+
return [];
|
|
97
103
|
}
|
|
98
104
|
if (this.sawThinkingPartials) {
|
|
99
105
|
return [];
|