Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d2cd7a

Browse files
authored
Merge branch 'main' into jakehwll/ai-bridge-observability
2 parents1569749 +ee58f40 commit5d2cd7a

File tree

16 files changed

+749
-45
lines changed

16 files changed

+749
-45
lines changed

‎.github/.linkspector.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ ignorePatterns:
2727
-pattern:"splunk.com"
2828
-pattern:"stackoverflow.com/questions"
2929
-pattern:"developer.hashicorp.com/terraform/language"
30-
-pattern:"platform.openai.com/docs/api-reference"
30+
-pattern:"platform.openai.com"
3131
-pattern:"api.openai.com"
3232
aliveStatusCodes:
3333
-200

‎agent/agent.go‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1095,7 +1095,7 @@ func (a *agent) handleManifest(manifestOK *checkpoint) func(ctx context.Context,
10951095
iferr!=nil {
10961096
returnxerrors.Errorf("fetch metadata: %w",err)
10971097
}
1098-
a.logger.Info(ctx,"fetched manifest",slog.F("manifest",mp))
1098+
a.logger.Info(ctx,"fetched manifest")
10991099
manifest,err:=agentsdk.ManifestFromProto(mp)
11001100
iferr!=nil {
11011101
a.logger.Critical(ctx,"failed to convert manifest",slog.F("manifest",mp),slog.Error(err))

‎codersdk/deployment.go‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ const (
8080
FeatureWorkspaceProxyFeatureName="workspace_proxy"
8181
FeatureExternalTokenEncryptionFeatureName="external_token_encryption"
8282
FeatureWorkspaceBatchActionsFeatureName="workspace_batch_actions"
83+
FeatureTaskBatchActionsFeatureName="task_batch_actions"
8384
FeatureAccessControlFeatureName="access_control"
8485
FeatureControlSharedPortsFeatureName="control_shared_ports"
8586
FeatureCustomRolesFeatureName="custom_roles"
@@ -111,6 +112,7 @@ var (
111112
FeatureUserRoleManagement,
112113
FeatureExternalTokenEncryption,
113114
FeatureWorkspaceBatchActions,
115+
FeatureTaskBatchActions,
114116
FeatureAccessControl,
115117
FeatureControlSharedPorts,
116118
FeatureCustomRoles,
@@ -157,6 +159,7 @@ func (n FeatureName) AlwaysEnable() bool {
157159
FeatureExternalProvisionerDaemons:true,
158160
FeatureAppearance:true,
159161
FeatureWorkspaceBatchActions:true,
162+
FeatureTaskBatchActions:true,
160163
FeatureHighAvailability:true,
161164
FeatureCustomRoles:true,
162165
FeatureMultipleOrganizations:true,

‎docs/ai-coder/ai-bridge/setup.md‎

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,34 @@ Set the following when routing [Amazon Bedrock](https://coder.com/docs/reference
5858
-`CODER_AIBRIDGE_BEDROCK_MODEL` or`--aibridge-bedrock-model`
5959
-`CODER_AIBRIDGE_BEDROCK_SMALL_FAST_MODEL` or`--aibridge-bedrock-small-fast-model`
6060

61+
####Obtaining Bedrock credentials
62+
63+
1.**Choose a region** where you want to use Bedrock.
64+
65+
2.**Generate API keys** in the[AWS Bedrock console](https://us-east-1.console.aws.amazon.com/bedrock/home?region=us-east-1#/api-keys/long-term/create) (replace`us-east-1` in the URL with your chosen region):
66+
- Choose an expiry period for the key.
67+
- Click**Generate**.
68+
- This creates an IAM user with strictly-scoped permissions for Bedrock access.
69+
70+
3.**Create an access key** for the IAM user:
71+
- After generating the API key, click**"You can directly modify permissions for the IAM user associated"**.
72+
- In the IAM user page, navigate to the**Security credentials** tab.
73+
- Under**Access keys**, click**Create access key**.
74+
- Select**"Application running outside AWS"** as the use case.
75+
- Click**Next**.
76+
- Add a description like "Coder AI Bridge token".
77+
- Click**Create access key**.
78+
- Save both the access key ID and secret access key securely.
79+
80+
4.**Configure your Coder deployment** with the credentials:
81+
82+
```sh
83+
export CODER_AIBRIDGE_BEDROCK_REGION=us-east-1
84+
export CODER_AIBRIDGE_BEDROCK_ACCESS_KEY=<your-access-key-id>
85+
export CODER_AIBRIDGE_BEDROCK_ACCESS_KEY_SECRET=<your-secret-access-key>
86+
coder server
87+
```
88+
6189
###Additional providers and Model Proxies
6290

6391
AI Bridge can relay traffic to other OpenAI- or Anthropic-compatible services or model proxies like LiteLLM by pointing the base URL variables above at the provider you operate. Share feedback or follow along in the[`aibridge`](https://github.com/coder/aibridge) issue tracker as we expand support for additional providers.

‎dogfood/coder/main.tf‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -268,17 +268,12 @@ data "coder_parameter" "ide_choices" {
268268
form_type="multi-select"
269269
mutable=true
270270
description="Choose one or more IDEs to enable in your workspace"
271-
default=jsonencode(["vscode","code-server","cursor","mux"])
271+
default=jsonencode(["vscode","code-server","cursor"])
272272
option {
273273
name="VS Code Desktop"
274274
value="vscode"
275275
icon="/icon/code.svg"
276276
}
277-
option {
278-
name="mux"
279-
value="mux"
280-
icon="/icon/mux.svg"
281-
}
282277
option {
283278
name="code-server"
284279
value="code-server"
@@ -376,7 +371,7 @@ module "personalize" {
376371
}
377372

378373
module"mux" {
379-
count=contains(jsondecode(data.coder_parameter.ide_choices.value),"mux")? data.coder_workspace.me.start_count:0
374+
count=data.coder_workspace.me.start_count
380375
source="registry.coder.com/coder/mux/coder"
381376
version="1.0.1"
382377
agent_id=coder_agent.dev.id

‎site/src/api/typesGenerated.ts‎

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more aboutcustomizing how changed files appear on GitHub.

‎site/src/modules/dashboard/Navbar/DeploymentDropdown.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ export const DeploymentDropdown: FC<DeploymentDropdownProps> = ({
3434
!canViewConnectionLog&&
3535
!canViewOrganizations&&
3636
!canViewDeployment&&
37-
!canViewHealth
37+
!canViewHealth&&
38+
!canViewAIBridge
3839
){
3940
returnnull;
4041
}

‎site/src/pages/TaskPage/TaskPage.stories.tsx‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import{
22
MockDeletedWorkspace,
3+
MockDisplayNameTasks,
34
MockFailedWorkspace,
45
MockStartingWorkspace,
56
MockStoppedWorkspace,
@@ -561,6 +562,38 @@ export const WorkspaceStartFailureWithDialog: Story = {
561562
},
562563
};
563564

565+
constlongDisplayName=
566+
"Implement comprehensive authentication and authorization system with role-based access control";
567+
exportconstLongDisplayName:Story={
568+
parameters:{
569+
queries:[
570+
{
571+
// Sidebar: uses getTasks() which returns an array
572+
key:["tasks",{owner:MockTask.owner_name}],
573+
data:[
574+
{ ...MockDisplayNameTasks[0],display_name:longDisplayName},
575+
...MockDisplayNameTasks.slice(1),
576+
],
577+
},
578+
{
579+
// TaskTopbar: uses getTask() which returns a single task
580+
key:["tasks",MockTask.owner_name,MockTask.id],
581+
data:{ ...MockDisplayNameTasks[0],display_name:longDisplayName},
582+
},
583+
{
584+
// Workspace data for the task
585+
key:[
586+
"workspace",
587+
MockTask.owner_name,
588+
MockTask.workspace_name,
589+
"settings",
590+
],
591+
data:MockWorkspace,
592+
},
593+
],
594+
},
595+
};
596+
564597
functionmockTaskWithWorkspace(
565598
sidebarApp:WorkspaceApp,
566599
activeApp:WorkspaceApp,

‎site/src/pages/TaskPage/TaskTopbar.tsx‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type TaskTopbarProps = { task: Task; workspace: Workspace };
2323

2424
exportconstTaskTopbar:FC<TaskTopbarProps>=({ task, workspace})=>{
2525
return(
26-
<headerclassName="flex flex-shrink-0 items-center p-3 border-solid border-border border-0 border-b">
26+
<headerclassName="flex flex-shrink-0 items-centergap-2p-3 border-solid border-border border-0 border-b">
2727
<TooltipProvider>
2828
<Tooltip>
2929
<TooltipTriggerasChild>
@@ -38,7 +38,9 @@ export const TaskTopbar: FC<TaskTopbarProps> = ({ task, workspace }) => {
3838
</Tooltip>
3939
</TooltipProvider>
4040

41-
<h1className="m-0 pl-2 text-base font-medium truncate">{task.name}</h1>
41+
<h1className="m-0 pl-2 text-base font-medium max-w-[520px] truncate">
42+
{task.display_name}
43+
</h1>
4244

4345
{task.current_state?.uri&&(
4446
<divclassName="flex items-center gap-2 flex-wrap ml-4">
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
import{chromatic}from"testHelpers/chromatic";
2+
import{MockTask}from"testHelpers/entities";
3+
importtype{Meta,StoryObj}from"@storybook/react-vite";
4+
import{action}from"storybook/actions";
5+
import{userEvent,within}from"storybook/test";
6+
import{BatchDeleteConfirmation}from"./BatchDeleteConfirmation";
7+
8+
constmeta:Meta<typeofBatchDeleteConfirmation>={
9+
title:"pages/TasksPage/BatchDeleteConfirmation",
10+
parameters:{ chromatic},
11+
component:BatchDeleteConfirmation,
12+
args:{
13+
onClose:action("onClose"),
14+
onConfirm:action("onConfirm"),
15+
open:true,
16+
isLoading:false,
17+
checkedTasks:[
18+
MockTask,
19+
{
20+
...MockTask,
21+
id:"task-2",
22+
name:"task-test-456",
23+
display_name:"Add API Tests",
24+
initial_prompt:"Add comprehensive tests for the API endpoints",
25+
// Different owner to test admin bulk delete of other users' tasks
26+
owner_name:"bob",
27+
created_at:newDate(Date.now()-24*60*60*1000).toISOString(),
28+
updated_at:newDate(Date.now()-1*60*60*1000).toISOString(),
29+
},
30+
{
31+
...MockTask,
32+
id:"task-3",
33+
name:"task-docs-789",
34+
display_name:"Update Documentation",
35+
initial_prompt:"Update documentation for the new features",
36+
// Intentionally null to test that only 2 workspaces are shown in review resources stage
37+
workspace_id:null,
38+
created_at:newDate(
39+
Date.now()-3*24*60*60*1000,
40+
).toISOString(),
41+
updated_at:newDate(
42+
Date.now()-2*24*60*60*1000,
43+
).toISOString(),
44+
},
45+
],
46+
workspaceCount:2,
47+
},
48+
};
49+
50+
exportdefaultmeta;
51+
typeStory=StoryObj<typeofBatchDeleteConfirmation>;
52+
53+
exportconstConsequences:Story={};
54+
55+
exportconstReviewTasks:Story={
56+
play:async({ canvasElement, step})=>{
57+
constbody=within(canvasElement.ownerDocument.body);
58+
59+
awaitstep("Advance to stage 2: Review tasks",async()=>{
60+
constconfirmButton=awaitbody.findByRole("button",{
61+
name:/reviewselectedtasks/i,
62+
});
63+
awaituserEvent.click(confirmButton);
64+
});
65+
},
66+
};
67+
68+
exportconstReviewResources:Story={
69+
play:async({ canvasElement, step})=>{
70+
constbody=within(canvasElement.ownerDocument.body);
71+
72+
awaitstep("Advance to stage 2: Review tasks",async()=>{
73+
constconfirmButton=awaitbody.findByRole("button",{
74+
name:/reviewselectedtasks/i,
75+
});
76+
awaituserEvent.click(confirmButton);
77+
});
78+
79+
awaitstep("Advance to stage 3: Review resources",async()=>{
80+
constconfirmButton=awaitbody.findByRole("button",{
81+
name:/confirm.*tasks/i,
82+
});
83+
awaituserEvent.click(confirmButton);
84+
});
85+
},
86+
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp