diff options
| author | adamdottv <[email protected]> | 2025-05-14 13:06:09 -0500 |
|---|---|---|
| committer | adamdottv <[email protected]> | 2025-05-14 13:06:09 -0500 |
| commit | 3982be4310aa57209fd4ce2be833c3515f759ba8 (patch) | |
| tree | 1bf577d7185afb153dd1f3e8fd7c4dbe36bb6448 /internal/tui/components/dialog | |
| parent | 4c998d4f4ff2d9570796a81a95eb84d34d0a6939 (diff) | |
| download | opencode-3982be4310aa57209fd4ce2be833c3515f759ba8.tar.gz opencode-3982be4310aa57209fd4ce2be833c3515f759ba8.zip | |
feat: session specific logs
Diffstat (limited to 'internal/tui/components/dialog')
| -rw-r--r-- | internal/tui/components/dialog/session.go | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/internal/tui/components/dialog/session.go b/internal/tui/components/dialog/session.go index 1d2ba6a19..0ec828266 100644 --- a/internal/tui/components/dialog/session.go +++ b/internal/tui/components/dialog/session.go @@ -11,13 +11,10 @@ import ( "github.com/sst/opencode/internal/tui/util" ) -// SessionSelectedMsg is sent when a session is selected -type SessionSelectedMsg struct { - Session session.Session -} - // CloseSessionDialogMsg is sent when the session dialog is closed -type CloseSessionDialogMsg struct{} +type CloseSessionDialogMsg struct { + Session *session.Session +} // SessionDialog interface for the session switching dialog type SessionDialog interface { @@ -92,10 +89,10 @@ func (s *sessionDialogCmp) Update(msg tea.Msg) (tea.Model, tea.Cmd) { case key.Matches(msg, sessionKeys.Enter): if len(s.sessions) > 0 { selectedSession := s.sessions[s.selectedIdx] - // Update the session manager with the selected session - // session.SetCurrentSession(selectedSession.ID) - return s, util.CmdHandler(SessionSelectedMsg{ - Session: selectedSession, + s.selectedSessionID = selectedSession.ID + + return s, util.CmdHandler(CloseSessionDialogMsg{ + Session: &selectedSession, }) } case key.Matches(msg, sessionKeys.Escape): |
