create-theokit 1.23.3 → 1.23.4
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/package.json
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024" width="1024" height="1024" role="img" aria-label="Theo">
|
|
2
|
+
<rect x="0" y="0" width="1024" height="1024" rx="205" ry="205" fill="#431A7A"/>
|
|
3
|
+
<g fill="#ffffff" fill-rule="evenodd" transform="translate(512,512) scale(0.66) translate(-512,-512)">
|
|
4
|
+
<path d="M193.9,195.9 L180.9,198.9 L162.0,209.9 L149.0,224.9 L142.0,240.9 L140.0,250.9 L140.0,369.7 L142.0,379.7 L155.0,403.6 L163.0,411.6 L180.9,421.6 L193.9,424.6 L354.7,425.6 L366.7,430.6 L376.7,442.6 L379.7,452.6 L379.7,777.1 L384.7,793.1 L390.7,803.1 L411.6,821.1 L434.6,828.1 L585.4,828.1 L595.4,826.1 L608.4,821.1 L627.3,805.1 L635.3,792.1 L640.3,773.1 L639.3,475.5 L631.3,458.6 L623.4,450.6 L608.4,442.6 L503.5,439.6 L503.5,304.8 L411.6,203.9 L403.6,198.9 L392.7,195.9 Z"/>
|
|
5
|
+
<path d="M629.3,195.9 L612.4,202.9 L519.5,304.8 L519.5,424.6 L830.1,424.6 L848.0,419.6 L861.0,411.6 L875.0,395.7 L880.0,385.7 L884.0,369.7 L884.0,250.9 L879.0,232.9 L869.0,216.9 L857.0,205.9 L843.1,198.9 L829.1,195.9 Z"/>
|
|
6
|
+
</g>
|
|
7
|
+
</svg>
|
|
Binary file
|
|
@@ -29,6 +29,9 @@ async fn run_turn(
|
|
|
29
29
|
.shell()
|
|
30
30
|
.sidecar("theo-sidecar")
|
|
31
31
|
.map_err(|e| e.to_string())?
|
|
32
|
+
// Forward this process's environment (the provider key — OPENROUTER_API_KEY /
|
|
33
|
+
// ANTHROPIC_API_KEY — lives here) so the sidecar can authenticate.
|
|
34
|
+
.envs(std::env::vars())
|
|
32
35
|
.args([message])
|
|
33
36
|
.spawn()
|
|
34
37
|
.map_err(|e| e.to_string())?;
|
|
@@ -41,18 +44,22 @@ async fn run_turn(
|
|
|
41
44
|
*guard = Some(child);
|
|
42
45
|
}
|
|
43
46
|
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
47
|
+
// AWAIT the stream inline — do NOT spawn a detached task and return early. The webview's
|
|
48
|
+
// `ChannelTransport` calls `invoke('run_turn').then(onClose)`, and `onClose` CLOSES the stream
|
|
49
|
+
// (further chunks are dropped). If `run_turn` resolves before the sidecar's chunks are delivered
|
|
50
|
+
// over the Channel, every chunk lands after the stream is closed → the agent renders no reply.
|
|
51
|
+
// Resolving only after the sidecar terminates makes `onClose` fire AFTER the last chunk. HITL is
|
|
52
|
+
// unaffected: `approve` writes to the child's stdin via shared state while this loop awaits.
|
|
53
|
+
while let Some(event) = rx.recv().await {
|
|
54
|
+
match event {
|
|
55
|
+
CommandEvent::Stdout(bytes) => {
|
|
56
|
+
let line = String::from_utf8_lossy(&bytes).to_string();
|
|
57
|
+
let _ = on_chunk.send(line);
|
|
53
58
|
}
|
|
59
|
+
CommandEvent::Terminated(_) => break,
|
|
60
|
+
_ => {}
|
|
54
61
|
}
|
|
55
|
-
}
|
|
62
|
+
}
|
|
56
63
|
Ok(())
|
|
57
64
|
}
|
|
58
65
|
|