shiroai 2.0.5 → 2.0.6

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 +6 -1
  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
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "shiroai",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
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"],