@cairnvibe/sdk 0.2.3 → 0.2.5

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/index.js CHANGED
@@ -193,7 +193,12 @@ function Copilot({ endpoint = "/api/copilot", registeredActions = [], onDo, repo
193
193
  touringRef.current = true;
194
194
  if (wasRealtimeListening)
195
195
  setRtStatus("rt-speaking");
196
- archiveCurrentExchange();
196
+ // No archiveCurrentExchange() here: whatever triggered this tour (a typed
197
+ // ask() or a realtime "final") already archived the exchange *before*
198
+ // this one — by the time a tour's "verb" message arrives, the triggering
199
+ // question is the CURRENT turn, still live in userCaption for the whole
200
+ // tour. Archiving it again here would just duplicate it (verified live —
201
+ // this used to show the triggering question twice).
197
202
  setAnswer(null);
198
203
  // Tracked locally rather than reading the component's `pathname` —
199
204
  // that's only current as of this render, and a step below can navigate
@@ -86,6 +86,7 @@ function spawnCompanion(command) {
86
86
  process.on("SIGTERM", () => shutdown(0));
87
87
  }
88
88
  function main() {
89
+ loadDotEnv();
89
90
  const withCommand = parseWithFlag(process.argv.slice(2));
90
91
  // With --with, this process's real job is running the companion command
91
92
  // (`next dev`, typically) — a missing key or an unbuilt manifest should
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cairnvibe/sdk",
3
- "version": "0.2.3",
3
+ "version": "0.2.5",
4
4
  "description": "In-app AI copilot — <Copilot/> for React/Next.js, <cairn-widget> for any framework — plus the server handlers and realtime voice relay behind them.",
5
5
  "license": "MIT",
6
6
  "publishConfig": { "access": "public" },
package/src/index.tsx CHANGED
@@ -254,7 +254,12 @@ export function Copilot({
254
254
  const wasRealtimeListening = realtimeActive;
255
255
  touringRef.current = true;
256
256
  if (wasRealtimeListening) setRtStatus("rt-speaking");
257
- archiveCurrentExchange();
257
+ // No archiveCurrentExchange() here: whatever triggered this tour (a typed
258
+ // ask() or a realtime "final") already archived the exchange *before*
259
+ // this one — by the time a tour's "verb" message arrives, the triggering
260
+ // question is the CURRENT turn, still live in userCaption for the whole
261
+ // tour. Archiving it again here would just duplicate it (verified live —
262
+ // this used to show the triggering question twice).
258
263
  setAnswer(null);
259
264
  // Tracked locally rather than reading the component's `pathname` —
260
265
  // that's only current as of this render, and a step below can navigate
@@ -82,6 +82,7 @@ function spawnCompanion(command: string): void {
82
82
  }
83
83
 
84
84
  function main(): void {
85
+ loadDotEnv();
85
86
  const withCommand = parseWithFlag(process.argv.slice(2));
86
87
 
87
88
  // With --with, this process's real job is running the companion command