Skip to content

Commit c9ffa9b

Browse files
committed
remove needs_user_attention and emoji
1 parent ae1d974 commit c9ffa9b

File tree

2 files changed

+5
-16
lines changed

2 files changed

+5
-16
lines changed

codersdk/toolsdk/toolsdk.go

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ var (
6767
"type": "string",
6868
"description": "A link to a relevant resource, such as a PR or issue.",
6969
},
70-
"emoji": map[string]any{
71-
"type": "string",
72-
"description": "An emoji that visually represents your current progress. Choose an emoji that helps the user understand your current status at a glance.",
73-
},
7470
"state": map[string]any{
7571
"type": "string",
7672
"description": "The state of your task. This can be one of the following: working, complete, or failure. Select the state that best represents your current progress.",
@@ -81,7 +77,7 @@ var (
8177
},
8278
},
8379
},
84-
Required: []string{"summary", "link", "emoji", "state"},
80+
Required: []string{"summary", "link", "state"},
8581
},
8682
},
8783
Handler: func(ctx context.Context, args map[string]any) (string, error) {
@@ -104,22 +100,16 @@ var (
104100
if !ok {
105101
return "", xerrors.New("link must be a string")
106102
}
107-
emoji, ok := args["emoji"].(string)
108-
if !ok {
109-
return "", xerrors.New("emoji must be a string")
110-
}
111103
state, ok := args["state"].(string)
112104
if !ok {
113105
return "", xerrors.New("state must be a string")
114106
}
115107

116108
if err := agentClient.PatchAppStatus(ctx, agentsdk.PatchAppStatus{
117-
AppSlug: appSlug,
118-
Message: summary,
119-
URI: link,
120-
Icon: emoji,
121-
NeedsUserAttention: false, // deprecated, to be removed later
122-
State: codersdk.WorkspaceAppStatusState(state),
109+
AppSlug: appSlug,
110+
Message: summary,
111+
URI: link,
112+
State: codersdk.WorkspaceAppStatusState(state),
123113
}); err != nil {
124114
return "", err
125115
}

codersdk/toolsdk/toolsdk_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ func TestTools(t *testing.T) {
7474
"summary": "test summary",
7575
"state": "complete",
7676
"link": "https://example.com",
77-
"emoji": "✅",
7877
})
7978
require.NoError(t, err)
8079
})

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy