@ai-ide-bridge/cursor 1.1.0 → 1.1.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/.turbo/turbo-build.log +1 -1
- package/dist/session.js +5 -1
- package/package.json +1 -1
- package/src/session.ts +6 -1
package/.turbo/turbo-build.log
CHANGED
package/dist/session.js
CHANGED
|
@@ -58,7 +58,11 @@ export class CursorBridgeSession {
|
|
|
58
58
|
buildPrompt(messages) {
|
|
59
59
|
const blocks = [];
|
|
60
60
|
for (const m of messages) {
|
|
61
|
-
const text = typeof m.content === 'string'
|
|
61
|
+
const text = typeof m.content === 'string'
|
|
62
|
+
? m.content
|
|
63
|
+
: m.content != null
|
|
64
|
+
? JSON.stringify(m.content)
|
|
65
|
+
: '';
|
|
62
66
|
if (!text)
|
|
63
67
|
continue;
|
|
64
68
|
const label = m.role === 'tool' ? `tool (${m.tool_call_id ?? m.name ?? 'result'})` : m.role;
|
package/package.json
CHANGED
package/src/session.ts
CHANGED
|
@@ -68,7 +68,12 @@ export class CursorBridgeSession implements BridgeSession {
|
|
|
68
68
|
private buildPrompt(messages: Message[]): string {
|
|
69
69
|
const blocks: string[] = [];
|
|
70
70
|
for (const m of messages) {
|
|
71
|
-
const text =
|
|
71
|
+
const text =
|
|
72
|
+
typeof m.content === 'string'
|
|
73
|
+
? m.content
|
|
74
|
+
: m.content != null
|
|
75
|
+
? JSON.stringify(m.content)
|
|
76
|
+
: '';
|
|
72
77
|
if (!text) continue;
|
|
73
78
|
const label = m.role === 'tool' ? `tool (${m.tool_call_id ?? m.name ?? 'result'})` : m.role;
|
|
74
79
|
blocks.push(`[${label}]\n${text}`);
|