@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.
@@ -1,4 +1,4 @@
1
1
 
2
- > @ai-ide-bridge/cursor@1.1.0 build /home/runner/work/llm-bridge/llm-bridge/packages/cursor
2
+ > @ai-ide-bridge/cursor@1.1.2 build /home/runner/work/llm-bridge/llm-bridge/packages/cursor
3
3
  > tsc
4
4
 
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' ? m.content : '';
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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-ide-bridge/cursor",
3
- "version": "1.1.0",
3
+ "version": "1.1.2",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
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 = typeof m.content === 'string' ? m.content : '';
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}`);