Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8b6c4de

Browse files
committed
whoami -> get_authenticated-user
1 parent 87b161e commit 8b6c4de

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

codersdk/toolsdk/toolsdk.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var (
3838
ListWorkspaces.Generic(),
3939
ListTemplates.Generic(),
4040
ListTemplateVersionParameters.Generic(),
41-
Whoami.Generic(),
41+
GetAuthenticatedUser.Generic(),
4242
CreateWorkspaceBuild.Generic(),
4343
UploadTarFile.Generic(),
4444
CreateTemplateVersion.Generic(),
@@ -311,9 +311,9 @@ is provisioned correctly and the agent can connect to the control plane.
311311
},
312312
}
313313

314-
Whoami = Tool[codersdk.User]{
314+
GetAuthenticatedUser = Tool[codersdk.User]{
315315
Tool: aisdk.Tool{
316-
Name: "coder_whoami",
316+
Name: "coder_get_authenticated_user",
317317
Description: "Get the currently authenticated user, similar to the `whoami` command.",
318318
},
319319
Handler: func(ctx context.Context, _ map[string]any) (codersdk.User, error) {

codersdk/toolsdk/toolsdk_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ func TestTools(t *testing.T) {
108108
ctx := testutil.Context(t, testutil.WaitShort)
109109
ctx = toolsdk.WithClient(ctx, memberClient)
110110

111-
result, err := testTool(ctx, t, toolsdk.Whoami, map[string]any{})
111+
result, err := testTool(ctx, t, toolsdk.GetAuthenticatedUser, map[string]any{})
112112

113113
require.NoError(t, err)
114114
require.Equal(t, member.ID, result.ID)

0 commit comments

Comments
 (0)