openrune 0.3.10 → 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/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)
|