Skip to content

Commit 5e5980d

Browse files
committed
Merge branch 'main' of github.com:stacklok/codegate-ui into fix/server-side-pagination
2 parents 6ff3eaf + 787519d commit 5e5980d

File tree

19 files changed

+345
-83
lines changed

19 files changed

+345
-83
lines changed

.github/workflows/_release-please.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
continue-on-error: true
1313
steps:
14-
- uses: googleapis/release-please-action@7987652d64b4581673a76e33ad5e98e3dd56832f # v4
14+
- uses: googleapis/release-please-action@d1a8f221d7723166f48a584aebba00ef3f6febec # v4
1515
id: release
1616
with:
1717
token: ${{ secrets.GH_PAT_RELEASE_PLEASE }}

index.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
</head>
88
<body class="theme-minder">
99
<div id="root"></div>
10+
<script>
11+
window.APP_CONFIG = {
12+
BASE_API_URL: '${BASE_API_URL}',
13+
}
14+
</script>
1015
<script type="module" src="/src/main.tsx"></script>
1116
</body>
1217
</html>

package-lock.json

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
"lint-staged": "^15.3.0",
9393
"msw": "^2.7.0",
9494
"postcss": "^8.4.49",
95-
"prettier": "3.4.2",
95+
"prettier": "3.5.3",
9696
"prettier-plugin-classnames": "^0.7.6",
9797
"prettier-plugin-merge": "^0.7.2",
9898
"prettier-plugin-tailwindcss": "^0.6.11",

src/api/generated/@tanstack/react-query.gen.ts

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-explicit-any */
21
// This file is auto-generated by @hey-api/openapi-ts
32

43
import type { OptionsLegacyParser } from '@hey-api/client-fetch'
@@ -23,6 +22,7 @@ import {
2322
v1CreateWorkspace,
2423
v1ListActiveWorkspaces,
2524
v1ActivateWorkspace,
25+
v1UpdateWorkspace,
2626
v1DeleteWorkspace,
2727
v1ListArchivedWorkspaces,
2828
v1RecoverWorkspace,
@@ -62,6 +62,9 @@ import type {
6262
V1ActivateWorkspaceData,
6363
V1ActivateWorkspaceError,
6464
V1ActivateWorkspaceResponse,
65+
V1UpdateWorkspaceData,
66+
V1UpdateWorkspaceError,
67+
V1UpdateWorkspaceResponse,
6568
V1DeleteWorkspaceData,
6669
V1DeleteWorkspaceError,
6770
V1DeleteWorkspaceResponse,
@@ -451,6 +454,26 @@ export const v1ActivateWorkspaceMutation = (
451454
return mutationOptions
452455
}
453456

457+
export const v1UpdateWorkspaceMutation = (
458+
options?: Partial<OptionsLegacyParser<V1UpdateWorkspaceData>>
459+
) => {
460+
const mutationOptions: UseMutationOptions<
461+
V1UpdateWorkspaceResponse,
462+
V1UpdateWorkspaceError,
463+
OptionsLegacyParser<V1UpdateWorkspaceData>
464+
> = {
465+
mutationFn: async (localOptions) => {
466+
const { data } = await v1UpdateWorkspace({
467+
...options,
468+
...localOptions,
469+
throwOnError: true,
470+
})
471+
return data
472+
},
473+
}
474+
return mutationOptions
475+
}
476+
454477
export const v1DeleteWorkspaceMutation = (
455478
options?: Partial<OptionsLegacyParser<V1DeleteWorkspaceData>>
456479
) => {
@@ -628,7 +651,9 @@ const createInfiniteParams = <
628651
const params = queryKey[0]
629652
if (page.body) {
630653
params.body = {
654+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
631655
...(queryKey[0].body as any),
656+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
632657
...(page.body as any),
633658
}
634659
}

src/api/generated/sdk.gen.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ import type {
4141
V1ActivateWorkspaceData,
4242
V1ActivateWorkspaceError,
4343
V1ActivateWorkspaceResponse,
44+
V1UpdateWorkspaceData,
45+
V1UpdateWorkspaceError,
46+
V1UpdateWorkspaceResponse,
4447
V1DeleteWorkspaceData,
4548
V1DeleteWorkspaceError,
4649
V1DeleteWorkspaceResponse,
@@ -315,6 +318,23 @@ export const v1ActivateWorkspace = <ThrowOnError extends boolean = false>(
315318
})
316319
}
317320

321+
/**
322+
* Update Workspace
323+
* Update a workspace.
324+
*/
325+
export const v1UpdateWorkspace = <ThrowOnError extends boolean = false>(
326+
options: OptionsLegacyParser<V1UpdateWorkspaceData, ThrowOnError>
327+
) => {
328+
return (options?.client ?? client).put<
329+
V1UpdateWorkspaceResponse,
330+
V1UpdateWorkspaceError,
331+
ThrowOnError
332+
>({
333+
...options,
334+
url: '/api/v1/workspaces/{workspace_name}',
335+
})
336+
}
337+
318338
/**
319339
* Delete Workspace
320340
* Delete a workspace by name.

src/api/generated/types.gen.ts

Lines changed: 29 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -124,14 +124,18 @@ export type Conversation = {
124124
alerts?: Array<Alert>
125125
}
126126

127-
export type CreateOrRenameWorkspaceRequest = {
127+
export type CustomInstructions = {
128+
prompt: string
129+
}
130+
131+
export type FullWorkspace_Input = {
128132
name: string
129-
config?: WorkspaceConfig | null
130-
rename_to?: string | null
133+
config?: WorkspaceConfig_Input | null
131134
}
132135

133-
export type CustomInstructions = {
134-
prompt: string
136+
export type FullWorkspace_Output = {
137+
name: string
138+
config?: WorkspaceConfig_Output | null
135139
}
136140

137141
export type HTTPValidationError = {
@@ -287,8 +291,13 @@ export type Workspace = {
287291
is_active: boolean
288292
}
289293

290-
export type WorkspaceConfig = {
291-
system_prompt: string
294+
export type WorkspaceConfig_Input = {
295+
custom_instructions: string
296+
muxing_rules: Array<MuxRule>
297+
}
298+
299+
export type WorkspaceConfig_Output = {
300+
custom_instructions: string
292301
muxing_rules: Array<MuxRule>
293302
}
294303

@@ -384,10 +393,10 @@ export type V1ListWorkspacesResponse = ListWorkspacesResponse
384393
export type V1ListWorkspacesError = unknown
385394

386395
export type V1CreateWorkspaceData = {
387-
body: CreateOrRenameWorkspaceRequest
396+
body: FullWorkspace_Input
388397
}
389398

390-
export type V1CreateWorkspaceResponse = Workspace
399+
export type V1CreateWorkspaceResponse = FullWorkspace_Output
391400

392401
export type V1CreateWorkspaceError = HTTPValidationError
393402

@@ -406,6 +415,17 @@ export type V1ActivateWorkspaceResponse = unknown
406415

407416
export type V1ActivateWorkspaceError = HTTPValidationError
408417

418+
export type V1UpdateWorkspaceData = {
419+
body: FullWorkspace_Input
420+
path: {
421+
workspace_name: string
422+
}
423+
}
424+
425+
export type V1UpdateWorkspaceResponse = FullWorkspace_Output
426+
427+
export type V1UpdateWorkspaceError = HTTPValidationError
428+
409429
export type V1DeleteWorkspaceData = {
410430
path: {
411431
workspace_name: string

0 commit comments

Comments
 (0)