Skip to content

Commit b4afe2a

Browse files
committed
chore: fix agentapi attach
1 parent cf3e045 commit b4afe2a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cmd/attach/attach.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ func (m model) View() string {
7373
}
7474

7575
func ReadScreenOverHTTP(ctx context.Context, url string, ch chan<- types.ScreenUpdateBody) error {
76+
fmt.Println(url)
7677
req, _ := http.NewRequestWithContext(ctx, http.MethodGet, url, nil)
7778
req.Header.Set("Content-Type", "application/json")
7879

@@ -150,7 +151,7 @@ func runAttach(remoteUrl string) error {
150151
readScreenErrCh := make(chan error, 1)
151152
go func() {
152153
defer close(readScreenErrCh)
153-
if err := ReadScreenOverHTTP(ctx, remoteUrl+"/internal/conversation", screenCh); err != nil {
154+
if err := ReadScreenOverHTTP(ctx, remoteUrl+"/internal/screen", screenCh); err != nil {
154155
if errors.Is(err, context.Canceled) {
155156
return
156157
}
@@ -227,6 +228,7 @@ var AttachCmd = &cobra.Command{
227228
Long: `Attach to a running agent`,
228229
Run: func(cmd *cobra.Command, args []string) {
229230
remoteUrl := remoteUrlArg
231+
fmt.Println(remoteUrl)
230232
if remoteUrl == "" {
231233
fmt.Fprintln(os.Stderr, "URL is required")
232234
os.Exit(1)

0 commit comments

Comments
 (0)