Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,9 @@ When the agent requests approval for a dangerous operation, answer inline:
what it's actually doing (`🧪 running tests`, `📖 reading client.go`,
`🚀 pushing`) with a live elapsed timer.
- **Session browser** (`^R`) — resume, replay, or delete past conversations.
- **Auto-reconnect** — if the socket drops, bodek redials with backoff
(500ms → 8s, 5 attempts) and the session resumes transparently on your next
prompt; only a server that stays down leaves the `disconnected` badge.
- **Model switcher** (`^O`) — change the model for the next turn.
- **Cancellation** (`Esc`) — abort a running turn via odek's cancel API.
- **Sandbox aware** — the header shows `🛡 sandboxed` or `⚠ host access`; pass
Expand Down
3 changes: 3 additions & 0 deletions cmd/bodek/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,9 @@ func run() error {
LogPath: logPath,
OdekVersion: srv.Version,
Version: currentVersion(),
Reconnect: func() (*client.Client, error) {
return client.Dial(srv.WSURL, srv.Origin, srv.BaseURL, srv.Token)
},
})

// Mouse reporting enables wheel scrolling in the transcript, but it also
Expand Down
39 changes: 39 additions & 0 deletions internal/tui/approval.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
package tui

import (
tea "github.com/charmbracelet/bubbletea"
)

// handleApprovalKey answers the pending approval (or quits); any other key
// is swallowed while the panel waits for a decision.
func (m *Model) handleApprovalKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
switch msg.String() {
case "a", "y":
return m, m.answer("approve")
case "d", "n":
return m, m.answer("deny")
case "t":
if m.approval.AllowTrust {
return m, m.answer("trust")
}
case "ctrl+c":
m.quitting = true
return m, tea.Quit
}
return m, nil
}

func (m *Model) answer(action string) tea.Cmd {
id := m.approval.ID
m.approval = nil
m.status = "thinking"
m.relayout()
m.refresh()
cl := m.cl
return func() tea.Msg {
if err := cl.SendApproval(id, action); err != nil {
return errMsg{err}
}
return nil
}
}
Loading