Skip to content

Commit 3a1f737

Browse files
committed
Merge branch 'main' into improve-user-experience-workspcaes
2 parents c756690 + 7529f73 commit 3a1f737

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+815
-416
lines changed

CHANGELOG.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,38 @@
11
# Changelog
22

3+
## [0.14.1](https://github.com/stacklok/codegate-ui/compare/v0.14.0...v0.14.1) (2025-02-07)
4+
5+
6+
### Bug Fixes
7+
8+
* set 5s of duration for all the toast notifications ([#281](https://github.com/stacklok/codegate-ui/issues/281)) ([2542b5f](https://github.com/stacklok/codegate-ui/commit/2542b5fe2c6e67ea8ac055baa47100591e468570))
9+
10+
## [0.14.0](https://github.com/stacklok/codegate-ui/compare/v0.13.1...v0.14.0) (2025-02-07)
11+
12+
13+
### Features
14+
15+
* show alert detail in the conversation page ([#277](https://github.com/stacklok/codegate-ui/issues/277)) ([8154d3e](https://github.com/stacklok/codegate-ui/commit/8154d3e9c8082f6aac0fc2914621dd99f8f71936))
16+
17+
## [0.13.1](https://github.com/stacklok/codegate-ui/compare/v0.13.0...v0.13.1) (2025-02-07)
18+
19+
20+
### Bug Fixes
21+
22+
* provider endpoint and mux section ([#275](https://github.com/stacklok/codegate-ui/issues/275)) ([cadbd5f](https://github.com/stacklok/codegate-ui/commit/cadbd5f71125a9a0dac9824c6f1bdf8aabca4071))
23+
24+
25+
### Reverts
26+
27+
* openapi-ts upgrade ([#273](https://github.com/stacklok/codegate-ui/issues/273)) ([2a5234c](https://github.com/stacklok/codegate-ui/commit/2a5234c1246577070fd978397db87b637c42cd9f))
28+
29+
## [0.13.0](https://github.com/stacklok/codegate-ui/compare/v0.12.2...v0.13.0) (2025-02-06)
30+
31+
32+
### Features
33+
34+
* enforce sensible defaults for react-query ([#268](https://github.com/stacklok/codegate-ui/issues/268)) ([5445eb6](https://github.com/stacklok/codegate-ui/commit/5445eb6aefbd6270d7258dd3bbf3d03c1beea83a))
35+
336
## [0.12.2](https://github.com/stacklok/codegate-ui/compare/v0.12.1...v0.12.2) (2025-02-05)
437

538

eslint.config.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,20 @@ export default tseslint.config(
105105
message:
106106
"Do not directly call `invalidateQueries`. Instead, use the `invalidateQueries` helper function.",
107107
},
108+
{
109+
selector: [
110+
"CallExpression[callee.object.name='http'][callee.property.name='all'] > Literal:first-child",
111+
"CallExpression[callee.object.name='http'][callee.property.name='head'] > Literal:first-child",
112+
"CallExpression[callee.object.name='http'][callee.property.name='get'] > Literal:first-child",
113+
"CallExpression[callee.object.name='http'][callee.property.name='post'] > Literal:first-child",
114+
"CallExpression[callee.object.name='http'][callee.property.name='put'] > Literal:first-child",
115+
"CallExpression[callee.object.name='http'][callee.property.name='delete'] > Literal:first-child",
116+
"CallExpression[callee.object.name='http'][callee.property.name='patch'] > Literal:first-child",
117+
"CallExpression[callee.object.name='http'][callee.property.name='options'] > Literal:first-child",
118+
].join(", "),
119+
message:
120+
"Do not pass a string as the first argument to methods on Mock Service Worker's `http`. Use the `mswEndpoint` helper function instead, which provides type-safe routes based on the OpenAPI spec and the API base URL.",
121+
},
108122
],
109123
"no-restricted-imports": [
110124
"error",

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "vite-project",
33
"private": true,
4-
"version": "0.12.2",
4+
"version": "0.14.1",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -58,7 +58,7 @@
5858
"devDependencies": {
5959
"@eslint/js": "^9.15.0",
6060
"@faker-js/faker": "^9.4.0",
61-
"@hey-api/openapi-ts": "^0.64.1",
61+
"@hey-api/openapi-ts": "^0.61.2",
6262
"@tailwindcss/typography": "^0.5.16",
6363
"@testing-library/dom": "^10.4.0",
6464
"@testing-library/jest-dom": "^6.6.3",

src/api/generated/types.gen.ts

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,28 @@ export type AddProviderEndpointRequest = {
1919
description?: string;
2020
provider_type: ProviderType;
2121
endpoint?: string;
22-
auth_type?: ProviderAuthType | null;
22+
auth_type?: ProviderAuthType;
2323
api_key?: string | null;
2424
};
2525

26+
/**
27+
* Represents an alert.
28+
*/
29+
export type Alert = {
30+
id: string;
31+
prompt_id: string;
32+
code_snippet: CodeSnippet | null;
33+
trigger_string:
34+
| string
35+
| {
36+
[key: string]: unknown;
37+
}
38+
| null;
39+
trigger_type: string;
40+
trigger_category: string | null;
41+
timestamp: string;
42+
};
43+
2644
/**
2745
* Represents an alert with it's respective conversation.
2846
*/
@@ -50,11 +68,19 @@ export type ChatMessage = {
5068
message_id: string;
5169
};
5270

71+
/**
72+
* Represents a code snippet with its programming language.
73+
*
74+
* Args:
75+
* language: The programming language identifier (e.g., 'python', 'javascript')
76+
* code: The actual code content
77+
*/
5378
export type CodeSnippet = {
5479
code: string;
5580
language: string | null;
5681
filepath: string | null;
5782
libraries?: Array<string>;
83+
file_extension?: string | null;
5884
};
5985

6086
/**
@@ -75,6 +101,7 @@ export type Conversation = {
75101
chat_id: string;
76102
conversation_timestamp: string;
77103
token_usage_agg: TokenUsageAggregate | null;
104+
alerts?: Array<Alert>;
78105
};
79106

80107
export type CreateOrRenameWorkspaceRequest = {
@@ -146,7 +173,7 @@ export type ProviderEndpoint = {
146173
description?: string;
147174
provider_type: ProviderType;
148175
endpoint?: string;
149-
auth_type?: ProviderAuthType | null;
176+
auth_type?: ProviderAuthType;
150177
};
151178

152179
/**
@@ -159,6 +186,7 @@ export enum ProviderType {
159186
OLLAMA = "ollama",
160187
LM_STUDIO = "lm_studio",
161188
LLAMACPP = "llamacpp",
189+
OPENROUTER = "openrouter",
162190
}
163191

164192
/**

src/api/openapi.json

Lines changed: 95 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,14 +1145,7 @@
11451145
"default": ""
11461146
},
11471147
"auth_type": {
1148-
"anyOf": [
1149-
{
1150-
"$ref": "#/components/schemas/ProviderAuthType"
1151-
},
1152-
{
1153-
"type": "null"
1154-
}
1155-
],
1148+
"$ref": "#/components/schemas/ProviderAuthType",
11561149
"default": "none"
11571150
},
11581151
"api_key": {
@@ -1175,6 +1168,74 @@
11751168
"title": "AddProviderEndpointRequest",
11761169
"description": "Represents a request to add a provider endpoint."
11771170
},
1171+
"Alert": {
1172+
"properties": {
1173+
"id": {
1174+
"type": "string",
1175+
"title": "Id"
1176+
},
1177+
"prompt_id": {
1178+
"type": "string",
1179+
"title": "Prompt Id"
1180+
},
1181+
"code_snippet": {
1182+
"anyOf": [
1183+
{
1184+
"$ref": "#/components/schemas/CodeSnippet"
1185+
},
1186+
{
1187+
"type": "null"
1188+
}
1189+
]
1190+
},
1191+
"trigger_string": {
1192+
"anyOf": [
1193+
{
1194+
"type": "string"
1195+
},
1196+
{
1197+
"type": "object"
1198+
},
1199+
{
1200+
"type": "null"
1201+
}
1202+
],
1203+
"title": "Trigger String"
1204+
},
1205+
"trigger_type": {
1206+
"type": "string",
1207+
"title": "Trigger Type"
1208+
},
1209+
"trigger_category": {
1210+
"anyOf": [
1211+
{
1212+
"type": "string"
1213+
},
1214+
{
1215+
"type": "null"
1216+
}
1217+
],
1218+
"title": "Trigger Category"
1219+
},
1220+
"timestamp": {
1221+
"type": "string",
1222+
"format": "date-time",
1223+
"title": "Timestamp"
1224+
}
1225+
},
1226+
"type": "object",
1227+
"required": [
1228+
"id",
1229+
"prompt_id",
1230+
"code_snippet",
1231+
"trigger_string",
1232+
"trigger_type",
1233+
"trigger_category",
1234+
"timestamp"
1235+
],
1236+
"title": "Alert",
1237+
"description": "Represents an alert."
1238+
},
11781239
"AlertConversation": {
11791240
"properties": {
11801241
"conversation": {
@@ -1300,7 +1361,19 @@
13001361
"type": "string"
13011362
},
13021363
"type": "array",
1303-
"title": "Libraries"
1364+
"title": "Libraries",
1365+
"default": []
1366+
},
1367+
"file_extension": {
1368+
"anyOf": [
1369+
{
1370+
"type": "string"
1371+
},
1372+
{
1373+
"type": "null"
1374+
}
1375+
],
1376+
"title": "File Extension"
13041377
}
13051378
},
13061379
"type": "object",
@@ -1309,7 +1382,8 @@
13091382
"language",
13101383
"filepath"
13111384
],
1312-
"title": "CodeSnippet"
1385+
"title": "CodeSnippet",
1386+
"description": "Represents a code snippet with its programming language.\n\nArgs:\n language: The programming language identifier (e.g., 'python', 'javascript')\n code: The actual code content"
13131387
},
13141388
"ConfigureAuthMaterial": {
13151389
"properties": {
@@ -1376,6 +1450,14 @@
13761450
"type": "null"
13771451
}
13781452
]
1453+
},
1454+
"alerts": {
1455+
"items": {
1456+
"$ref": "#/components/schemas/Alert"
1457+
},
1458+
"type": "array",
1459+
"title": "Alerts",
1460+
"default": []
13791461
}
13801462
},
13811463
"type": "object",
@@ -1580,14 +1662,7 @@
15801662
"default": ""
15811663
},
15821664
"auth_type": {
1583-
"anyOf": [
1584-
{
1585-
"$ref": "#/components/schemas/ProviderAuthType"
1586-
},
1587-
{
1588-
"type": "null"
1589-
}
1590-
],
1665+
"$ref": "#/components/schemas/ProviderAuthType",
15911666
"default": "none"
15921667
}
15931668
},
@@ -1607,7 +1682,8 @@
16071682
"vllm",
16081683
"ollama",
16091684
"lm_studio",
1610-
"llamacpp"
1685+
"llamacpp",
1686+
"openrouter"
16111687
],
16121688
"title": "ProviderType",
16131689
"description": "Represents the different types of providers we support."

0 commit comments

Comments
 (0)