openrune 0.3.9 → 0.3.11
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/bin/rune.js +1 -1
- package/lib/index.js +1 -1
- package/package.json +1 -1
- package/renderer/src/App.tsx +6 -1
- package/renderer/src/features/chat/use-chat.ts +9 -0
package/bin/rune.js
CHANGED
|
@@ -862,7 +862,7 @@ function runRune(file, restArgs) {
|
|
|
862
862
|
if (outputFormat === 'json') {
|
|
863
863
|
claudeArgs.push('--output-format', 'json')
|
|
864
864
|
}
|
|
865
|
-
claudeArgs.push(prompt)
|
|
865
|
+
claudeArgs.push('--', prompt)
|
|
866
866
|
|
|
867
867
|
const os = require('os')
|
|
868
868
|
const child = spawn('claude', claudeArgs, {
|
package/lib/index.js
CHANGED
|
@@ -51,7 +51,7 @@ function load(filePath) {
|
|
|
51
51
|
claudeArgs.push('--system-prompt', systemParts.join('\n'))
|
|
52
52
|
}
|
|
53
53
|
claudeArgs.push('--add-dir', folderPath)
|
|
54
|
-
claudeArgs.push(prompt)
|
|
54
|
+
claudeArgs.push('--', prompt)
|
|
55
55
|
|
|
56
56
|
// Run from a temp dir to avoid loading .mcp.json from the project folder
|
|
57
57
|
const os = require('os')
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "openrune",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.11",
|
|
4
4
|
"description": "Rune — File-based AI Agent Harness for Claude Code",
|
|
5
5
|
"keywords": ["ai", "agent", "claude", "desktop", "electron", "mcp", "claude-code", "harness", "automation"],
|
|
6
6
|
"repository": {
|
package/renderer/src/App.tsx
CHANGED
|
@@ -7,7 +7,7 @@ export function App() {
|
|
|
7
7
|
const chat = useChat()
|
|
8
8
|
const [showTerminal, setShowTerminal] = useState(true)
|
|
9
9
|
|
|
10
|
-
// Auto-switch to chat when MCP channel connects
|
|
10
|
+
// Auto-switch to chat when MCP channel connects OR when history is loaded
|
|
11
11
|
useEffect(() => {
|
|
12
12
|
const handler = (data: { port: number; connected: boolean }) => {
|
|
13
13
|
if (data.connected) setShowTerminal(false)
|
|
@@ -16,6 +16,11 @@ export function App() {
|
|
|
16
16
|
return () => window.rune.off('rune:channelStatus', handler)
|
|
17
17
|
}, [])
|
|
18
18
|
|
|
19
|
+
// If there's existing history, show chat immediately
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
if (chat.messages.length > 0) setShowTerminal(false)
|
|
22
|
+
}, [chat.messages.length > 0])
|
|
23
|
+
|
|
19
24
|
const toggleTerminal = useCallback(() => setShowTerminal(prev => !prev), [])
|
|
20
25
|
|
|
21
26
|
if (!chat.runeInfo) {
|
|
@@ -16,10 +16,19 @@ export function useChat() {
|
|
|
16
16
|
const send = useIPCSend()
|
|
17
17
|
|
|
18
18
|
// Track channel connection status
|
|
19
|
+
const lastStatusRef = useRef<{ port: number; connected: boolean } | null>(null)
|
|
19
20
|
useIPCOn('rune:channelStatus', (data: { port: number; connected: boolean }) => {
|
|
21
|
+
lastStatusRef.current = data
|
|
20
22
|
if (runeInfo && data.port === runeInfo.port) setConnected(data.connected)
|
|
21
23
|
})
|
|
22
24
|
|
|
25
|
+
// Apply buffered status when runeInfo arrives
|
|
26
|
+
useEffect(() => {
|
|
27
|
+
if (runeInfo && lastStatusRef.current && lastStatusRef.current.port === runeInfo.port) {
|
|
28
|
+
setConnected(lastStatusRef.current.connected)
|
|
29
|
+
}
|
|
30
|
+
}, [runeInfo])
|
|
31
|
+
|
|
23
32
|
// Initialize from main process
|
|
24
33
|
useIPCOn('rune:init', (data: RuneInfo) => {
|
|
25
34
|
setRuneInfo(data)
|