From 4b132656df319d68ac5c88f01fd1bb3dc28f12d8 Mon Sep 17 00:00:00 2001 From: adamdottv <2363879+adamdottv@users.noreply.github.com> Date: Thu, 19 Jun 2025 09:05:41 -0500 Subject: [PATCH] feat(tui): copy share url to clipboard --- packages/tui/internal/tui/tui.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/tui/internal/tui/tui.go b/packages/tui/internal/tui/tui.go index d7cf2f60..6e052eff 100644 --- a/packages/tui/internal/tui/tui.go +++ b/packages/tui/internal/tui/tui.go @@ -398,12 +398,16 @@ func (a appModel) executeCommand(command commands.Command) (tea.Model, tea.Cmd) if a.app.Session.Id == "" { return a, nil } - a.app.Client.PostSessionShareWithResponse( + response, _ := a.app.Client.PostSessionShareWithResponse( context.Background(), client.PostSessionShareJSONRequestBody{ SessionID: a.app.Session.Id, }, ) + if response.JSON200 != nil && response.JSON200.Share != nil { + shareUrl := response.JSON200.Share.Url + cmds = append(cmds, tea.SetClipboard(shareUrl)) + } case commands.SessionInterruptCommand: if a.app.Session.Id == "" { return a, nil