feat: add session rename functionality to TUI modal (#1821)
Co-authored-by: opencode <noreply@opencode.ai> Co-authored-by: Dax Raad <d@ironbay.co> Co-authored-by: Dax <mail@thdxr.com>
This commit is contained in:
committed by
GitHub
parent
81583cddbd
commit
47c327641b
@@ -760,6 +760,17 @@ func (a *App) DeleteSession(ctx context.Context, sessionID string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) UpdateSession(ctx context.Context, sessionID string, title string) error {
|
||||
_, err := a.Client.Session.Update(ctx, sessionID, opencode.SessionUpdateParams{
|
||||
Title: opencode.F(title),
|
||||
})
|
||||
if err != nil {
|
||||
slog.Error("Failed to update session", "error", err)
|
||||
return err
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) ListMessages(ctx context.Context, sessionId string) ([]Message, error) {
|
||||
response, err := a.Client.Session.Messages(ctx, sessionId)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user