@usabledev/usable-chat 1.204.1 → 1.204.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.
Files changed (2) hide show
  1. package/cli.js +32 -14
  2. package/package.json +1 -1
package/cli.js CHANGED
@@ -219645,6 +219645,31 @@ var init_spill_payload = __esm({
219645
219645
  }
219646
219646
  });
219647
219647
 
219648
+ // src/core/orchestrator/tool-continuation-message.ts
219649
+ function buildAssistantToolCallMessage(result) {
219650
+ const message = {
219651
+ role: "assistant",
219652
+ content: result.text || "",
219653
+ tool_calls: result.toolCalls.map((toolCall) => ({
219654
+ id: toolCall.id,
219655
+ type: "function",
219656
+ function: {
219657
+ name: toolCall.name,
219658
+ arguments: JSON.stringify(toolCall.arguments)
219659
+ }
219660
+ }))
219661
+ };
219662
+ if (result.rawModelParts?.length) {
219663
+ message._geminiRawParts = result.rawModelParts;
219664
+ }
219665
+ return message;
219666
+ }
219667
+ var init_tool_continuation_message = __esm({
219668
+ "src/core/orchestrator/tool-continuation-message.ts"() {
219669
+ "use strict";
219670
+ }
219671
+ });
219672
+
219648
219673
  // src/lib/personalization-prompt.ts
219649
219674
  function prependPersonalizationPrompts(basePrompt, prompts) {
219650
219675
  return [prompts.globalSystemPrompt?.trim(), prompts.voiceSystemPrompt?.trim(), basePrompt].filter((part) => Boolean(part)).join("\n\n");
@@ -339802,19 +339827,11 @@ Continue once without hiding or replacing your prior response.`
339802
339827
  },
339803
339828
  { userId, sessionId: sessionId2 }
339804
339829
  );
339805
- const assistantMessage = {
339806
- role: "assistant",
339807
- content: result.text || "",
339808
- // Preserve any text produced alongside tool calls
339809
- tool_calls: result.toolCalls.map((tc) => ({
339810
- id: tc.id,
339811
- type: "function",
339812
- function: {
339813
- name: tc.name,
339814
- arguments: JSON.stringify(tc.arguments)
339815
- }
339816
- }))
339817
- };
339830
+ const assistantMessage = buildAssistantToolCallMessage({
339831
+ text: result.text,
339832
+ toolCalls: result.toolCalls,
339833
+ rawModelParts: "rawModelParts" in result ? result.rawModelParts : void 0
339834
+ });
339818
339835
  if (result.reasoningDetails && result.reasoningDetails.length > 0) {
339819
339836
  if (!isClaude) {
339820
339837
  ;
@@ -340348,6 +340365,7 @@ var init_orchestrator = __esm({
340348
340365
  init_discoverable_skills_prompt();
340349
340366
  init_mcp_server_tools_prompt();
340350
340367
  init_spill_payload();
340368
+ init_tool_continuation_message();
340351
340369
  init_personalization_prompt();
340352
340370
  init_token_counter();
340353
340371
  HARNESS_COMPACT_RATIO = 0.75;
@@ -359353,7 +359371,7 @@ init_tui_select();
359353
359371
  init_model_registry();
359354
359372
 
359355
359373
  // package.json
359356
- var version2 = "1.204.1";
359374
+ var version2 = "1.204.2";
359357
359375
 
359358
359376
  // src/adapters/cli/model-catalog.ts
359359
359377
  init_codex_auth();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@usabledev/usable-chat",
3
- "version": "1.204.1",
3
+ "version": "1.204.2",
4
4
  "description": "usable-chat — terminal harness for usable-chat (headless + TUI)",
5
5
  "type": "module",
6
6
  "bin": {