|
|
@@ -50,6 +50,9 @@ type App struct {
|
|
|
IsLeaderSequence bool
|
|
|
}
|
|
|
|
|
|
+type SessionCreatedMsg = struct {
|
|
|
+ Session *opencode.Session
|
|
|
+}
|
|
|
type SessionSelectedMsg = *opencode.Session
|
|
|
type SessionLoadedMsg struct{}
|
|
|
type ModelSelectedMsg struct {
|
|
|
@@ -380,7 +383,7 @@ func (a *App) InitializeProject(ctx context.Context) tea.Cmd {
|
|
|
}
|
|
|
|
|
|
a.Session = session
|
|
|
- cmds = append(cmds, util.CmdHandler(SessionSelectedMsg(session)))
|
|
|
+ cmds = append(cmds, util.CmdHandler(SessionCreatedMsg{Session: session}))
|
|
|
|
|
|
go func() {
|
|
|
_, err := a.Client.Session.Init(ctx, a.Session.ID, opencode.SessionInitParams{
|
|
|
@@ -456,7 +459,7 @@ func (a *App) SendChatMessage(
|
|
|
return a, toast.NewErrorToast(err.Error())
|
|
|
}
|
|
|
a.Session = session
|
|
|
- cmds = append(cmds, util.CmdHandler(SessionSelectedMsg(session)))
|
|
|
+ cmds = append(cmds, util.CmdHandler(SessionCreatedMsg{Session: session}))
|
|
|
}
|
|
|
|
|
|
message := opencode.UserMessage{
|