shiroai 2.0.5 → 2.0.7

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.
Files changed (2) hide show
  1. package/cli.js +7 -2
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -274,9 +274,14 @@ initMessages();
274
274
  // ===== STREAMING API =====
275
275
  function streamChat(msgs, tools) {
276
276
  return new Promise((resolve, reject) => {
277
+ // DO inference doesn't allow system messages - convert to user context
278
+ const filteredMsgs = msgs.map(m => {
279
+ if (m.role === 'system') return { role: 'user', content: `[CONTEXT]\n${m.content}` };
280
+ return m;
281
+ });
277
282
  const payload = {
278
283
  model: MODEL,
279
- messages: msgs,
284
+ messages: filteredMsgs,
280
285
  stream: true,
281
286
  max_tokens: 8192
282
287
  };
@@ -292,7 +297,7 @@ function streamChat(msgs, tools) {
292
297
  method: 'POST',
293
298
  headers: {
294
299
  'Content-Type': 'application/json',
295
- 'Authorization': 'Bearer doo_v1_c1723ee6ceca27f7c2ac2dfa896e6f40ec36d88668ca921eccd81591314b4bd2',
300
+ 'Authorization': 'Bearer doo_v1_0c7c1b1cba3bef6d7a51b1b9d279cf070c18dfd222a774f072e973cee282d527',
296
301
  'Content-Length': Buffer.byteLength(body)
297
302
  }
298
303
  }, res => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiroai",
3
- "version": "2.0.5",
3
+ "version": "2.0.7",
4
4
  "description": "AI coding agent for your terminal — reads, writes, edits files, runs commands",
5
5
  "bin": { "shiroai": "./cli.js" },
6
6
  "files": ["cli.js"],