@stevezhou/sisu 0.3.7 → 0.3.8

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/commands.js CHANGED
@@ -277,8 +277,10 @@ function formatDirListing(bound) {
277
277
  function listLocalCommand(projectId) {
278
278
  (0, store_1.requireAuth)();
279
279
  const workspaces = (0, store_1.readWorkspaces)();
280
- const requested = (projectId || (0, store_1.readSession)().last_project_id || '').trim();
281
- if (requested && workspaces[requested]) {
280
+ const requested = (projectId || '').trim();
281
+ if (requested) {
282
+ if (!workspaces[requested])
283
+ throw new Error(`unknown workspace ${requested}`);
282
284
  return formatDirListing({ projectId: requested, path: workspaces[requested] });
283
285
  }
284
286
  const entries = Object.entries(workspaces);
@@ -23,7 +23,10 @@ async function* runLocalTurn(options) {
23
23
  for (let round = 0; round < maxRounds; round += 1) {
24
24
  const request = { model: options.model, messages: messages.map((row) => ({ ...row })), tools };
25
25
  requests.push(request);
26
- const completion = await options.client.complete(request);
26
+ let completion = await options.client.complete(request);
27
+ if (!completion.text && !completion.tool_calls.length) {
28
+ completion = await options.client.complete(request);
29
+ }
27
30
  if (completion.text) {
28
31
  text += completion.text;
29
32
  yield { type: 'text', text: completion.text };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stevezhou/sisu",
3
- "version": "0.3.7",
3
+ "version": "0.3.8",
4
4
  "description": "SiSu CLI — 思溯 / SiSu · 思有所溯",
5
5
  "license": "UNLICENSED",
6
6
  "homepage": "https://www.sisu.chat",