@inkeep/agents-manage-ui 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/{.env.sample → .env.example} +6 -1
- package/.turbo/turbo-build.log +27 -33
- package/.turbo/turbo-test.log +43 -10
- package/LICENSE.md +22 -17
- package/package.json +5 -5
- package/src/app/api/signoz/conversations/[conversationId]/route.ts +43 -4
- package/src/app/api/signoz/route.ts +8 -6
- package/src/components/api-keys/form/api-key-form.tsx +2 -0
- package/src/components/api-keys/form/validation.ts +1 -1
- package/src/components/artifact-components/form/artifact-component-form.tsx +5 -0
- package/src/components/artifact-components/form/validation.ts +3 -3
- package/src/components/credentials/views/credential-form-validation.ts +1 -1
- package/src/components/credentials/views/credential-form.tsx +2 -0
- package/src/components/credentials/views/edit-credential-form.tsx +1 -1
- package/src/components/credentials/views/generic-auth-form.tsx +1 -1
- package/src/components/data-components/form/data-component-form.tsx +10 -1
- package/src/components/data-components/form/validation.ts +3 -2
- package/src/components/form/expandable-field.tsx +6 -1
- package/src/components/form/form-field-wrapper.tsx +3 -1
- package/src/components/form/generic-combo-box.tsx +3 -1
- package/src/components/form/generic-input.tsx +9 -1
- package/src/components/form/generic-select.tsx +3 -1
- package/src/components/form/generic-textarea.tsx +3 -1
- package/src/components/form/json-schema-input.tsx +9 -1
- package/src/components/graph/playground/chat-widget.tsx +30 -1
- package/src/components/graph/playground/playground.tsx +7 -1
- package/src/components/graph/sidepane/metadata/metadata-editor.tsx +38 -38
- package/src/components/graph/sidepane/nodes/agent-node-editor.tsx +22 -8
- package/src/components/graph/sidepane/nodes/expandable-text-area.tsx +3 -1
- package/src/components/graph/sidepane/nodes/form-fields.tsx +10 -1
- package/src/components/mcp-servers/form/mcp-server-form.tsx +8 -1
- package/src/components/mcp-servers/form/validation.ts +1 -1
- package/src/components/projects/edit-project-dialog.tsx +1 -1
- package/src/components/projects/form/project-form.tsx +3 -0
- package/src/components/projects/form/validation.ts +14 -10
- package/src/components/projects/new-project-dialog.tsx +1 -1
- package/src/components/traces/timeline/timeline-wrapper.tsx +117 -28
- package/src/components/ui/alert.tsx +66 -0
- package/src/components/ui/form.tsx +11 -4
- package/src/hooks/use-chat-activities-polling.ts +44 -11
- package/src/lib/api/signoz-stats.ts +958 -304
- package/src/lib/types/graph-full.ts +1 -1
- package/src/lib/validation.ts +1 -1
|
@@ -2,4 +2,9 @@ NEXT_PUBLIC_TENANT_ID="inkeep"
|
|
|
2
2
|
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL="http://localhost:3002" # URL where inkeep-management-api is running
|
|
3
3
|
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL="http://localhost:3003" # URL where inkeep-execution-api is running
|
|
4
4
|
NEXT_PUBLIC_INKEEP_AUTH_TOKEN=""
|
|
5
|
-
NEXT_PUBLIC_DOCS_BASE_URL=""
|
|
5
|
+
NEXT_PUBLIC_DOCS_BASE_URL=""
|
|
6
|
+
NANGO_SECRET_KEY=
|
|
7
|
+
NEXT_PUBLIC_NANGO_HOST="http://localhost:3050"
|
|
8
|
+
NEXT_PUBLIC_NANGO_CONNECT_BASE_URL="http://localhost:3051"
|
|
9
|
+
SIGNOZ_URL=http://localhost:3080
|
|
10
|
+
SIGNOZ_API_KEY=
|
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @inkeep/agents-manage-ui@0.1.
|
|
3
|
+
> @inkeep/agents-manage-ui@0.1.1 build /Users/mileskaming-thanassi/agents/agents-manage-ui
|
|
4
4
|
> next build
|
|
5
5
|
|
|
6
6
|
[33m[1m⚠[22m[39m Warning: Found multiple lockfiles. Selecting /Users/mileskaming-thanassi/package-lock.json.
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
[37m[1m [22m[39m Creating an optimized production build ...
|
|
13
13
|
[32m[1m✓[22m[39m Compiled successfully in 8.0s
|
|
14
14
|
[37m[1m [22m[39m Skipping linting
|
|
15
|
-
[?25l [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G[?25h [37m[1m [22m[39m Checking validity of types
|
|
16
15
|
[32m[1m✓[22m[39m Checking validity of types
|
|
16
|
+
[?25l [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m..[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m...[39m[2K[1G [37m[1m [22m[39m Checking validity of types [36m.[39m[2K[1G[?25h [37m[1m [22m[39m Checking validity of types
|
|
17
17
|
[32m[1m✓[22m[39m Checking validity of types
|
|
18
18
|
[?25l [37m[1m [22m[39m Collecting page data [36m.[39m[2K[1G [37m[1m [22m[39m Collecting page data [36m..[39mNEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
19
19
|
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
20
20
|
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
@@ -33,51 +33,45 @@ NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localh
|
|
|
33
33
|
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
34
34
|
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
35
35
|
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
36
|
+
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
37
|
+
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
36
38
|
[2K[1G[?25h [37m[1m [22m[39m Collecting page data
|
|
37
39
|
[32m[1m✓[22m[39m Collecting page data
|
|
38
|
-
[?25l [37m[1m [22m[39m Generating static pages (0/7) [36m[ ][39m[2K[1G [37m[1m [22m[39m Generating static pages (0/7) [36m[= ][39m[2K[1G [37m[1m [22m[39m Generating static pages (
|
|
40
|
+
[?25l [37m[1m [22m[39m Generating static pages (0/7) [36m[ ][39m[2K[1G [37m[1m [22m[39m Generating static pages (0/7) [36m[= ][39m[2K[1G [37m[1m [22m[39m Generating static pages (0/7) [36m[== ][39m[2K[1G[?25hNEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
39
41
|
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
40
42
|
NEXT_PUBLIC_TENANT_ID is not set, using default tenantId: default
|
|
41
|
-
Error fetching projects, redirecting to projects page: Error [ApiError]: fetch failed
|
|
42
|
-
at g (.next/server/app/page.js:2:8538)
|
|
43
|
-
at async g (.next/server/app/page.js:2:9977)
|
|
44
|
-
at async g (.next/server/app/page.js:2:8871)
|
|
45
|
-
at async f (.next/server/app/page.js:1:959) {
|
|
46
|
-
error: [Object],
|
|
47
|
-
status: 500
|
|
48
|
-
}
|
|
49
43
|
[?25h [32m[1m✓[22m[39m Generating static pages (7/7)
|
|
50
|
-
[?25l [37m[1m [22m[39m Finalizing page optimization [36m.[39m[?25l [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m.[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m.[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m.[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G[?25h [37m[1m [22m[39m Collecting build traces
|
|
51
44
|
[32m[1m✓[22m[39m Collecting build traces
|
|
45
|
+
[?25l [37m[1m [22m[39m Finalizing page optimization [36m.[39m[?25l [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m.[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m.[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m.[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m.[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m..[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m..[39m[2K[1G [37m[1m [22m[39m Finalizing page optimization [36m...[39m[2K[1G [37m[1m [22m[39m Collecting build traces [36m...[39m[2K[1G[?25h [37m[1m [22m[39m Collecting build traces
|
|
52
46
|
[32m[1m✓[22m[39m Collecting build traces
|
|
53
47
|
[2K[1G[?25h [37m[1m [22m[39m Finalizing page optimization
|
|
54
48
|
[32m[1m✓[22m[39m Finalizing page optimization
|
|
55
49
|
|
|
56
50
|
[4mRoute (app)[24m [4mSize[24m [4mFirst Load JS[24m [4m[24m [4m[24m
|
|
57
51
|
┌ ○ / 142 B [37m[1m105 kB[22m[39m
|
|
58
52
|
├ ○ /_not-found 1 kB [37m[1m106 kB[22m[39m
|
|
59
53
|
├ ƒ /[tenantId] 142 B [37m[1m105 kB[22m[39m
|
|
60
|
-
├ ƒ /[tenantId]/projects 2.68 kB [37m[
|
|
54
|
+
├ ƒ /[tenantId]/projects 2.68 kB [37m[1m343 kB[22m[39m
|
|
61
55
|
├ ƒ /[tenantId]/projects/[projectId] 142 B [37m[1m105 kB[22m[39m
|
|
62
|
-
├ ƒ /[tenantId]/projects/[projectId]/api-keys 8.
|
|
63
|
-
├ ƒ /[tenantId]/projects/[projectId]/artifact-components 1.
|
|
64
|
-
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/[artifactComponentId] 1.
|
|
65
|
-
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/new 1.
|
|
66
|
-
├ ƒ /[tenantId]/projects/[projectId]/credentials 1.
|
|
67
|
-
├ ƒ /[tenantId]/projects/[projectId]/credentials/[credentialId] 3.
|
|
56
|
+
├ ƒ /[tenantId]/projects/[projectId]/api-keys 8.73 kB [37m[1m213 kB[22m[39m
|
|
57
|
+
├ ƒ /[tenantId]/projects/[projectId]/artifact-components 1.31 kB [37m[1m168 kB[22m[39m
|
|
58
|
+
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/[artifactComponentId] 1.54 kB [37m[1m341 kB[22m[39m
|
|
59
|
+
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/new 1.54 kB [37m[1m341 kB[22m[39m
|
|
60
|
+
├ ƒ /[tenantId]/projects/[projectId]/credentials 1.77 kB [37m[1m174 kB[22m[39m
|
|
61
|
+
├ ƒ /[tenantId]/projects/[projectId]/credentials/[credentialId] 3.92 kB [37m[1m184 kB[22m[39m
|
|
68
62
|
├ ƒ /[tenantId]/projects/[projectId]/credentials/new 206 B [37m[1m147 kB[22m[39m
|
|
69
|
-
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/bearer 7.
|
|
63
|
+
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/bearer 7.57 kB [37m[1m212 kB[22m[39m
|
|
70
64
|
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/providers 3.15 kB [37m[1m155 kB[22m[39m
|
|
71
|
-
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/providers/[providerId] 10.
|
|
72
|
-
├ ƒ /[tenantId]/projects/[projectId]/data-components 1.
|
|
73
|
-
├ ƒ /[tenantId]/projects/[projectId]/data-components/[dataComponentId] 1.
|
|
74
|
-
├ ƒ /[tenantId]/projects/[projectId]/data-components/new 1.
|
|
75
|
-
├ ƒ /[tenantId]/projects/[projectId]/graphs 1.
|
|
76
|
-
├ ƒ /[tenantId]/projects/[projectId]/graphs/[graphId]
|
|
77
|
-
├ ƒ /[tenantId]/projects/[projectId]/graphs/new 199 B [37m[
|
|
78
|
-
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers
|
|
65
|
+
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/providers/[providerId] 10.7 kB [37m[1m212 kB[22m[39m
|
|
66
|
+
├ ƒ /[tenantId]/projects/[projectId]/data-components 1.31 kB [37m[1m168 kB[22m[39m
|
|
67
|
+
├ ƒ /[tenantId]/projects/[projectId]/data-components/[dataComponentId] 1.46 kB [37m[1m341 kB[22m[39m
|
|
68
|
+
├ ƒ /[tenantId]/projects/[projectId]/data-components/new 1.46 kB [37m[1m341 kB[22m[39m
|
|
69
|
+
├ ƒ /[tenantId]/projects/[projectId]/graphs 1.29 kB [37m[1m168 kB[22m[39m
|
|
70
|
+
├ ƒ /[tenantId]/projects/[projectId]/graphs/[graphId] 199 B [37m[1m984 kB[22m[39m
|
|
71
|
+
├ ƒ /[tenantId]/projects/[projectId]/graphs/new 199 B [37m[1m984 kB[22m[39m
|
|
72
|
+
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers 3.94 kB [37m[1m176 kB[22m[39m
|
|
79
73
|
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId] 5.23 kB [37m[1m157 kB[22m[39m
|
|
80
|
-
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit
|
|
81
|
-
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers/new 1.41 kB [37m[
|
|
82
|
-
├ ƒ /[tenantId]/projects/[projectId]/traces 208 kB [37m[
|
|
83
|
-
├ ƒ /[tenantId]/projects/[projectId]/traces/ai-calls 3.59 kB [37m[
|
|
84
|
-
├ ƒ /[tenantId]/projects/[projectId]/traces/conversations/[conversationId]
|
|
74
|
+
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers/[mcpServerId]/edit 216 B [37m[1m194 kB[22m[39m
|
|
75
|
+
├ ƒ /[tenantId]/projects/[projectId]/mcp-servers/new 1.41 kB [37m[1m182 kB[22m[39m
|
|
76
|
+
├ ƒ /[tenantId]/projects/[projectId]/traces 208 kB [37m[1m431 kB[22m[39m
|
|
77
|
+
├ ƒ /[tenantId]/projects/[projectId]/traces/ai-calls 3.59 kB [37m[1m209 kB[22m[39m
|
|
78
|
+
├ ƒ /[tenantId]/projects/[projectId]/traces/conversations/[conversationId] 4.04 kB [37m[1m390 kB[22m[39m
|
|
85
79
|
├ ƒ /api/signoz 142 B [37m[1m105 kB[22m[39m
|
|
86
80
|
├ ƒ /api/signoz/conversations/[conversationId] 142 B [37m[1m105 kB[22m[39m
|
|
87
81
|
└ ○ /icon.svg 0 B [37m[1m0 B[22m[39m
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,33 +1,66 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @inkeep/agents-manage-ui@0.1.
|
|
3
|
+
> @inkeep/agents-manage-ui@0.1.1 test /Users/mileskaming-thanassi/agents/agents-manage-ui
|
|
4
4
|
> vitest --run
|
|
5
5
|
|
|
6
6
|
[?25l
|
|
7
7
|
[1m[46m RUN [49m[22m [36mv3.2.4 [39m[90m/Users/mileskaming-thanassi/agents/agents-manage-ui[39m
|
|
8
8
|
|
|
9
9
|
[?2026h
|
|
10
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/roundtrip.test.ts[2m [queued][22m
|
|
11
|
+
|
|
12
|
+
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (3)[39m
|
|
13
|
+
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (0)[39m
|
|
14
|
+
[2m Start at [22m16:14:10
|
|
15
|
+
[2m Duration [22m405ms
|
|
16
|
+
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K
|
|
17
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/roundtrip.test.ts[2m [queued][22m
|
|
10
18
|
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m [queued][22m
|
|
11
19
|
|
|
12
20
|
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (3)[39m
|
|
13
21
|
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (0)[39m
|
|
14
|
-
[2m Start at [
|
|
15
|
-
[2m Duration [
|
|
16
|
-
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K
|
|
22
|
+
[2m Start at [22m16:14:10
|
|
23
|
+
[2m Duration [22m610ms
|
|
24
|
+
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K
|
|
25
|
+
[1m[33m ❯ [39m[22msrc/app/utils/__tests__/format-date.test.ts[2m 0/22[22m
|
|
26
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/roundtrip.test.ts[2m [queued][22m
|
|
27
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m [queued][22m
|
|
28
|
+
|
|
29
|
+
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (3)[39m
|
|
30
|
+
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (22)[39m
|
|
31
|
+
[2m Start at [22m16:14:10
|
|
32
|
+
[2m Duration [22m713ms
|
|
33
|
+
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K
|
|
34
|
+
[1m[33m ❯ [39m[22msrc/app/utils/__tests__/format-date.test.ts[2m 1/22[22m
|
|
35
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/roundtrip.test.ts[2m [queued][22m
|
|
36
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m [queued][22m
|
|
37
|
+
|
|
38
|
+
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (3)[39m
|
|
39
|
+
[2m Tests [22m[1m[32m1 passed[39m[22m[90m (22)[39m
|
|
40
|
+
[2m Start at [22m16:14:10
|
|
41
|
+
[2m Duration [22m933ms
|
|
42
|
+
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K [32m✓[39m src/app/utils/__tests__/format-date.test.ts [2m([22m[2m22 tests[22m[2m)[22m[32m 13[2mms[22m[39m
|
|
17
43
|
|
|
18
44
|
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/roundtrip.test.ts[2m 0/1[22m
|
|
19
45
|
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m [queued][22m
|
|
20
46
|
|
|
21
47
|
[2m Test Files [22m[1m[32m1 passed[39m[22m[90m (3)[39m
|
|
22
48
|
[2m Tests [22m[1m[32m22 passed[39m[22m[90m (23)[39m
|
|
23
|
-
[2m Start at [
|
|
24
|
-
[2m Duration [
|
|
25
|
-
[?2026l[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K [32m✓[39m src/features/graph/domain/__tests__/
|
|
26
|
-
|
|
49
|
+
[2m Start at [22m16:14:10
|
|
50
|
+
[2m Duration [22m1.93s
|
|
51
|
+
[?2026l[?2026h[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K [32m✓[39m src/features/graph/domain/__tests__/roundtrip.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 10[2mms[22m[39m
|
|
52
|
+
|
|
53
|
+
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m 0/7[22m
|
|
54
|
+
|
|
55
|
+
[2m Test Files [22m[1m[32m2 passed[39m[22m[90m (3)[39m
|
|
56
|
+
[2m Tests [22m[1m[32m23 passed[39m[22m[90m (30)[39m
|
|
57
|
+
[2m Start at [22m16:14:10
|
|
58
|
+
[2m Duration [22m2.03s
|
|
59
|
+
[?2026l[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K[1A[K [32m✓[39m src/features/graph/domain/__tests__/serialize.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 4[2mms[22m[39m
|
|
27
60
|
|
|
28
61
|
[2m Test Files [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
29
62
|
[2m Tests [22m [1m[32m30 passed[39m[22m[90m (30)[39m
|
|
30
|
-
[2m Start at [22m
|
|
31
|
-
[2m Duration [22m
|
|
63
|
+
[2m Start at [22m 16:14:10
|
|
64
|
+
[2m Duration [22m 2.17s[2m (transform 528ms, setup 0ms, collect 3.01s, tests 28ms, environment 0ms, prepare 792ms)[22m
|
|
32
65
|
|
|
33
66
|
[?25h
|
package/LICENSE.md
CHANGED
|
@@ -1,44 +1,49 @@
|
|
|
1
|
-
Elastic License
|
|
2
|
-
|
|
1
|
+
# Inkeep SDK – Elastic License 2.0 with Supplemental Terms
|
|
2
|
+
|
|
3
|
+
NOTE: The Inkeep SDK is licensed under the Elastic License 2.0 (ELv2), subject to Supplemental Terms included in [SUPPLEMENTAL_TERMS.md](SUPPLEMENTAL_TERMS.md). In the event of conflict, the Supplemental Terms control.
|
|
4
|
+
|
|
5
|
+
# Elastic License 2.0
|
|
6
|
+
|
|
7
|
+
## Acceptance
|
|
3
8
|
By using the software, you agree to all of the terms and conditions below.
|
|
4
9
|
|
|
5
|
-
Copyright License
|
|
10
|
+
## Copyright License
|
|
6
11
|
The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below.
|
|
7
12
|
|
|
8
|
-
Limitations
|
|
13
|
+
## Limitations
|
|
9
14
|
You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
|
|
10
15
|
|
|
11
16
|
You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
|
|
12
17
|
|
|
13
18
|
You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
|
|
14
19
|
|
|
15
|
-
Patents
|
|
20
|
+
## Patents
|
|
16
21
|
The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
|
|
17
22
|
|
|
18
|
-
Notices
|
|
23
|
+
## Notices
|
|
19
24
|
You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
|
|
20
25
|
|
|
21
26
|
If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
|
|
22
27
|
|
|
23
|
-
No Other Rights
|
|
28
|
+
## No Other Rights
|
|
24
29
|
These terms do not imply any licenses other than those expressly granted in these terms.
|
|
25
30
|
|
|
26
|
-
Termination
|
|
31
|
+
## Termination
|
|
27
32
|
If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
|
|
28
33
|
|
|
29
|
-
No Liability
|
|
30
|
-
As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim
|
|
34
|
+
## No Liability
|
|
35
|
+
***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
|
|
31
36
|
|
|
32
|
-
Definitions
|
|
33
|
-
The licensor is the entity offering these terms, and the software is the software the licensor makes available under these terms, including any portion of it.
|
|
37
|
+
## Definitions
|
|
38
|
+
The **licensor** is the entity offering these terms, and the **software** is the software the licensor makes available under these terms, including any portion of it.
|
|
34
39
|
|
|
35
|
-
you refers to the individual or entity agreeing to these terms.
|
|
40
|
+
**you** refers to the individual or entity agreeing to these terms.
|
|
36
41
|
|
|
37
|
-
your company is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. control means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
42
|
+
**your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. **control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
|
|
38
43
|
|
|
39
|
-
your licenses are all the licenses granted to you for the software under these terms.
|
|
44
|
+
**your licenses** are all the licenses granted to you for the software under these terms.
|
|
40
45
|
|
|
41
|
-
use means anything you do with the software requiring one of your licenses.
|
|
46
|
+
**use** means anything you do with the software requiring one of your licenses.
|
|
42
47
|
|
|
43
|
-
trademark means trademarks, service marks, and similar rights.
|
|
48
|
+
**trademark** means trademarks, service marks, and similar rights.
|
|
44
49
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inkeep/agents-manage-ui",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@ai-sdk/react": "2.0.11",
|
|
@@ -55,11 +55,11 @@
|
|
|
55
55
|
"streamdown": "^1.0.12",
|
|
56
56
|
"tailwind-merge": "^3.3.1",
|
|
57
57
|
"use-stick-to-bottom": "^1.1.1",
|
|
58
|
-
"zod": "^
|
|
58
|
+
"zod": "^3.25.76",
|
|
59
59
|
"zustand": "^5.0.7",
|
|
60
|
-
"@inkeep/agents-manage-api": "0.1.
|
|
61
|
-
"@inkeep/agents-run-api": "0.1.
|
|
62
|
-
"@inkeep/agents-core": "0.1.
|
|
60
|
+
"@inkeep/agents-manage-api": "^0.1.2",
|
|
61
|
+
"@inkeep/agents-run-api": "^0.1.2",
|
|
62
|
+
"@inkeep/agents-core": "^0.1.2"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@biomejs/biome": "2.1.4",
|
|
@@ -45,7 +45,7 @@ function getNumber(span: SigNozListItem, key: string, fallback = 0): number {
|
|
|
45
45
|
return Number.isFinite(n) ? n : fallback;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
async function signozQuery(payload: any): Promise<SigNozResp
|
|
48
|
+
async function signozQuery(payload: any): Promise<SigNozResp> {
|
|
49
49
|
const logger = getLogger('signoz-query');
|
|
50
50
|
try {
|
|
51
51
|
logger.info({ payload }, 'SigNoz payload');
|
|
@@ -63,11 +63,31 @@ async function signozQuery(payload: any): Promise<SigNozResp | null> {
|
|
|
63
63
|
return json;
|
|
64
64
|
} catch (e) {
|
|
65
65
|
logger.error({ error: e }, 'SigNoz query error');
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
// Re-throw the error with more context for proper error handling
|
|
68
|
+
if (axios.isAxiosError(e)) {
|
|
69
|
+
if (e.code === 'ECONNREFUSED' || e.code === 'ENOTFOUND' || e.code === 'ETIMEDOUT') {
|
|
70
|
+
throw new Error(`SigNoz service unavailable: ${e.message}`);
|
|
71
|
+
}
|
|
72
|
+
if (e.response?.status === 401 || e.response?.status === 403) {
|
|
73
|
+
throw new Error(`SigNoz authentication failed: ${e.response.statusText}`);
|
|
74
|
+
}
|
|
75
|
+
if (e.response?.status === 400) {
|
|
76
|
+
throw new Error(`Invalid SigNoz query: ${e.response.statusText}`);
|
|
77
|
+
}
|
|
78
|
+
if (e.response?.status === 429) {
|
|
79
|
+
throw new Error(`SigNoz rate limit exceeded: ${e.response.statusText}`);
|
|
80
|
+
}
|
|
81
|
+
if (e.response?.status && e.response.status >= 500) {
|
|
82
|
+
throw new Error(`SigNoz server error: ${e.response.statusText}`);
|
|
83
|
+
}
|
|
84
|
+
throw new Error(`SigNoz request failed: ${e.message}`);
|
|
85
|
+
}
|
|
86
|
+
throw new Error(`SigNoz query failed: ${e instanceof Error ? e.message : 'Unknown error'}`);
|
|
67
87
|
}
|
|
68
88
|
}
|
|
69
89
|
|
|
70
|
-
function parseList(resp: SigNozResp
|
|
90
|
+
function parseList(resp: SigNozResp, name: string): SigNozListItem[] {
|
|
71
91
|
const list = resp?.data?.result?.find((r) => r?.queryName === name)?.list ?? [];
|
|
72
92
|
return Array.isArray(list) ? list : [];
|
|
73
93
|
}
|
|
@@ -858,6 +878,25 @@ export async function GET(
|
|
|
858
878
|
} catch (error) {
|
|
859
879
|
const logger = getLogger('conversation-details');
|
|
860
880
|
logger.error({ error }, 'Error fetching conversation details');
|
|
861
|
-
|
|
881
|
+
|
|
882
|
+
// Provide more specific error responses based on the error type
|
|
883
|
+
const errorMessage = error instanceof Error ? error.message : 'Failed to fetch conversation details';
|
|
884
|
+
|
|
885
|
+
if (errorMessage.includes('SigNoz service unavailable')) {
|
|
886
|
+
return NextResponse.json({ error: errorMessage }, { status: 503 });
|
|
887
|
+
}
|
|
888
|
+
if (errorMessage.includes('SigNoz authentication failed')) {
|
|
889
|
+
return NextResponse.json({ error: errorMessage }, { status: 502 });
|
|
890
|
+
}
|
|
891
|
+
if (errorMessage.includes('Invalid SigNoz query')) {
|
|
892
|
+
return NextResponse.json({ error: errorMessage }, { status: 400 });
|
|
893
|
+
}
|
|
894
|
+
if (errorMessage.includes('SigNoz rate limit exceeded')) {
|
|
895
|
+
return NextResponse.json({ error: errorMessage }, { status: 429 });
|
|
896
|
+
}
|
|
897
|
+
if (errorMessage.includes('SigNoz server error')) {
|
|
898
|
+
return NextResponse.json({ error: errorMessage }, { status: 502 });
|
|
899
|
+
}
|
|
900
|
+
return NextResponse.json({ error: errorMessage }, { status: 500 });
|
|
862
901
|
}
|
|
863
902
|
}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import { type NextRequest, NextResponse } from 'next/server';
|
|
2
|
-
import { z } from 'zod';
|
|
3
1
|
import axios from 'axios';
|
|
4
2
|
import axiosRetry from 'axios-retry';
|
|
3
|
+
import { type NextRequest, NextResponse } from 'next/server';
|
|
4
|
+
import { z } from 'zod/v4';
|
|
5
5
|
import { getLogger } from '@/lib/logger';
|
|
6
6
|
|
|
7
|
-
|
|
8
7
|
// Configure axios retry
|
|
9
|
-
axiosRetry(axios, {
|
|
8
|
+
axiosRetry(axios, {
|
|
10
9
|
retries: 3,
|
|
11
|
-
retryDelay: axiosRetry.exponentialDelay
|
|
10
|
+
retryDelay: axiosRetry.exponentialDelay,
|
|
12
11
|
});
|
|
13
12
|
|
|
14
13
|
const SIGNOZ_URL = process.env.SIGNOZ_URL || 'http://localhost:3080';
|
|
@@ -96,7 +95,10 @@ export async function POST(request: NextRequest) {
|
|
|
96
95
|
|
|
97
96
|
return NextResponse.json(data);
|
|
98
97
|
} catch (error) {
|
|
99
|
-
logger.error(
|
|
98
|
+
logger.error(
|
|
99
|
+
{ error, stack: error instanceof Error ? error.stack : undefined },
|
|
100
|
+
'Error proxying to SigNoz'
|
|
101
|
+
);
|
|
100
102
|
return NextResponse.json(
|
|
101
103
|
{
|
|
102
104
|
error: 'Failed to connect to SigNoz',
|
|
@@ -100,6 +100,7 @@ export function ApiKeyForm({
|
|
|
100
100
|
placeholder="Select expiration date"
|
|
101
101
|
options={EXPIRATION_DATE_OPTIONS}
|
|
102
102
|
selectTriggerClassName="w-full"
|
|
103
|
+
isRequired
|
|
103
104
|
/>
|
|
104
105
|
<GenericComboBox
|
|
105
106
|
control={form.control}
|
|
@@ -108,6 +109,7 @@ export function ApiKeyForm({
|
|
|
108
109
|
options={graphsOptions}
|
|
109
110
|
placeholder="Select a graph"
|
|
110
111
|
searchPlaceholder="Search graphs..."
|
|
112
|
+
isRequired
|
|
111
113
|
/>
|
|
112
114
|
<div className="flex justify-end">
|
|
113
115
|
<Button type="submit" disabled={isSubmitting}>
|
|
@@ -87,6 +87,7 @@ export function ArtifactComponentForm({
|
|
|
87
87
|
label="Id"
|
|
88
88
|
placeholder="my-artifact-component"
|
|
89
89
|
disabled={!!id}
|
|
90
|
+
isRequired
|
|
90
91
|
description={
|
|
91
92
|
id
|
|
92
93
|
? ''
|
|
@@ -98,6 +99,7 @@ export function ArtifactComponentForm({
|
|
|
98
99
|
name="name"
|
|
99
100
|
label="Name"
|
|
100
101
|
placeholder="Document Artifact"
|
|
102
|
+
isRequired
|
|
101
103
|
/>
|
|
102
104
|
<GenericTextarea
|
|
103
105
|
control={form.control}
|
|
@@ -105,18 +107,21 @@ export function ArtifactComponentForm({
|
|
|
105
107
|
label="Description"
|
|
106
108
|
placeholder="Structured factual information extracted from search results"
|
|
107
109
|
className="min-h-[80px]"
|
|
110
|
+
isRequired
|
|
108
111
|
/>
|
|
109
112
|
<JsonSchemaInput
|
|
110
113
|
control={form.control}
|
|
111
114
|
name="summaryProps"
|
|
112
115
|
label="Summary props (JSON Schema)"
|
|
113
116
|
placeholder="Enter a valid JSON Schema..."
|
|
117
|
+
isRequired
|
|
114
118
|
/>
|
|
115
119
|
<JsonSchemaInput
|
|
116
120
|
control={form.control}
|
|
117
121
|
name="fullProps"
|
|
118
122
|
label="Full props (JSON Schema)"
|
|
119
123
|
placeholder="Enter a valid JSON Schema..."
|
|
124
|
+
isRequired
|
|
120
125
|
/>
|
|
121
126
|
<Button type="submit" disabled={isSubmitting}>
|
|
122
127
|
Save
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
2
|
import { getJsonParseError, validateJsonSchemaForLlm } from '@/lib/json-schema-validation';
|
|
3
3
|
import { idSchema } from '@/lib/validation';
|
|
4
4
|
|
|
@@ -35,8 +35,8 @@ export const artifactComponentSchema = z.object({
|
|
|
35
35
|
id: idSchema,
|
|
36
36
|
name: z.string().min(1, 'Name is required.'),
|
|
37
37
|
description: z.string().min(1, 'Description is required.'),
|
|
38
|
-
summaryProps: jsonSchemaValidation('Summary props'),
|
|
39
|
-
fullProps: jsonSchemaValidation('Full props'),
|
|
38
|
+
summaryProps: jsonSchemaValidation('Summary props').optional(),
|
|
39
|
+
fullProps: jsonSchemaValidation('Full props').optional(),
|
|
40
40
|
});
|
|
41
41
|
|
|
42
42
|
export type ArtifactComponentFormData = z.infer<typeof artifactComponentSchema>;
|
|
@@ -115,6 +115,7 @@ export function CredentialForm({ onCreateCredential, tenantId, projectId }: Cred
|
|
|
115
115
|
name="name"
|
|
116
116
|
label="Name"
|
|
117
117
|
placeholder="e.g., production-api-key"
|
|
118
|
+
isRequired
|
|
118
119
|
/>
|
|
119
120
|
|
|
120
121
|
<div className="space-y-3">
|
|
@@ -123,6 +124,7 @@ export function CredentialForm({ onCreateCredential, tenantId, projectId }: Cred
|
|
|
123
124
|
name="apiKeyToSet"
|
|
124
125
|
label="API Key"
|
|
125
126
|
placeholder="e.g., sk-1234567890abcdef1234567890abcdef"
|
|
127
|
+
isRequired
|
|
126
128
|
/>
|
|
127
129
|
<div className="text-xs text-muted-foreground p-3 bg-muted/30 rounded-md">
|
|
128
130
|
<p className="mb-2">
|
|
@@ -4,7 +4,7 @@ import { zodResolver } from '@hookform/resolvers/zod';
|
|
|
4
4
|
import { useRouter } from 'next/navigation';
|
|
5
5
|
import { useForm } from 'react-hook-form';
|
|
6
6
|
import { toast } from 'sonner';
|
|
7
|
-
import { z } from 'zod';
|
|
7
|
+
import { z } from 'zod/v4';
|
|
8
8
|
import { CredentialToolsList } from '@/components/credentials/credential-tools-list';
|
|
9
9
|
import { GenericInput } from '@/components/form/generic-input';
|
|
10
10
|
import { GenericKeyValueInput } from '@/components/form/generic-key-value-input';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { zodResolver } from '@hookform/resolvers/zod';
|
|
4
4
|
import type { ApiProvider } from '@nangohq/types';
|
|
5
5
|
import { useForm } from 'react-hook-form';
|
|
6
|
-
import * as z from 'zod';
|
|
6
|
+
import * as z from 'zod/v4';
|
|
7
7
|
import { GenericInput } from '@/components/form/generic-input';
|
|
8
8
|
import { GenericTextarea } from '@/components/form/generic-textarea';
|
|
9
9
|
import { ProviderIcon } from '@/components/icons/provider-icon';
|
|
@@ -89,20 +89,29 @@ export function DataComponentForm({
|
|
|
89
89
|
? ''
|
|
90
90
|
: 'Choose a unique identifier for this component. Using an existing id will replace that component.'
|
|
91
91
|
}
|
|
92
|
+
isRequired
|
|
93
|
+
/>
|
|
94
|
+
<GenericInput
|
|
95
|
+
control={form.control}
|
|
96
|
+
name="name"
|
|
97
|
+
label="Name"
|
|
98
|
+
placeholder="List orders"
|
|
99
|
+
isRequired
|
|
92
100
|
/>
|
|
93
|
-
<GenericInput control={form.control} name="name" label="Name" placeholder="List orders" />
|
|
94
101
|
<GenericTextarea
|
|
95
102
|
control={form.control}
|
|
96
103
|
name="description"
|
|
97
104
|
label="Description"
|
|
98
105
|
placeholder="Display a list of user orders with interactive options"
|
|
99
106
|
className="min-h-[80px]"
|
|
107
|
+
isRequired
|
|
100
108
|
/>
|
|
101
109
|
<JsonSchemaInput
|
|
102
110
|
control={form.control}
|
|
103
111
|
name="props"
|
|
104
112
|
label="Props (JSON Schema)"
|
|
105
113
|
placeholder="Enter a valid JSON Schema..."
|
|
114
|
+
isRequired
|
|
106
115
|
/>
|
|
107
116
|
<Button type="submit" disabled={isSubmitting}>
|
|
108
117
|
Save
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { z } from 'zod';
|
|
1
|
+
import { z } from 'zod/v4';
|
|
2
2
|
import { getJsonParseError, validateJsonSchemaForLlm } from '@/lib/json-schema-validation';
|
|
3
3
|
import { idSchema } from '@/lib/validation';
|
|
4
4
|
|
|
@@ -32,7 +32,8 @@ export const dataComponentSchema = z.object({
|
|
|
32
32
|
});
|
|
33
33
|
return z.NEVER;
|
|
34
34
|
}
|
|
35
|
-
})
|
|
35
|
+
})
|
|
36
|
+
.optional(),
|
|
36
37
|
});
|
|
37
38
|
|
|
38
39
|
export type DataComponentFormData = z.infer<typeof dataComponentSchema>;
|
|
@@ -20,6 +20,7 @@ interface ExpandableFieldProps {
|
|
|
20
20
|
expandedView: ReactNode;
|
|
21
21
|
actions?: ReactNode;
|
|
22
22
|
expandButtonLabel?: string;
|
|
23
|
+
isRequired?: boolean;
|
|
23
24
|
}
|
|
24
25
|
|
|
25
26
|
export function ExpandableField({
|
|
@@ -30,13 +31,17 @@ export function ExpandableField({
|
|
|
30
31
|
expandedView,
|
|
31
32
|
actions,
|
|
32
33
|
expandButtonLabel = 'Expand to full screen',
|
|
34
|
+
isRequired = false,
|
|
33
35
|
}: ExpandableFieldProps) {
|
|
34
36
|
return (
|
|
35
37
|
<Dialog>
|
|
36
38
|
<div className={className}>
|
|
37
39
|
<div className="space-y-2">
|
|
38
40
|
<div className="flex items-center justify-between">
|
|
39
|
-
<Label htmlFor={name}>
|
|
41
|
+
<Label className="gap-1" htmlFor={name}>
|
|
42
|
+
{label}
|
|
43
|
+
{isRequired && <span className="text-red-500">*</span>}
|
|
44
|
+
</Label>
|
|
40
45
|
{actions && <div className="flex gap-2">{actions}</div>}
|
|
41
46
|
</div>
|
|
42
47
|
<div className="relative">
|
|
@@ -19,6 +19,7 @@ interface FormFieldWrapperProps<T extends FieldValues> {
|
|
|
19
19
|
children: (field: FieldValues) => React.ReactNode;
|
|
20
20
|
description?: string;
|
|
21
21
|
rules?: RegisterOptions<T, FieldPath<T>>;
|
|
22
|
+
isRequired?: boolean;
|
|
22
23
|
}
|
|
23
24
|
|
|
24
25
|
export function FormFieldWrapper<T extends FieldValues>({
|
|
@@ -28,6 +29,7 @@ export function FormFieldWrapper<T extends FieldValues>({
|
|
|
28
29
|
children,
|
|
29
30
|
description,
|
|
30
31
|
rules,
|
|
32
|
+
isRequired,
|
|
31
33
|
}: FormFieldWrapperProps<T>) {
|
|
32
34
|
return (
|
|
33
35
|
<FormField
|
|
@@ -36,7 +38,7 @@ export function FormFieldWrapper<T extends FieldValues>({
|
|
|
36
38
|
rules={rules}
|
|
37
39
|
render={({ field }) => (
|
|
38
40
|
<FormItem className="relative">
|
|
39
|
-
<FormLabel>{label}</FormLabel>
|
|
41
|
+
<FormLabel isRequired={isRequired}>{label}</FormLabel>
|
|
40
42
|
<FormControl>{children(field)}</FormControl>
|
|
41
43
|
{description && <FormDescription>{description}</FormDescription>}
|
|
42
44
|
<FormMessage />
|