@inkeep/agents-manage-ui 0.1.2 → 0.1.3
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.example +2 -2
- package/.turbo/turbo-build.log +30 -30
- package/.turbo/turbo-test.log +10 -43
- package/.turbo/turbo-typecheck.log +1 -1
- package/README.md +3 -3
- package/biome.json +3 -0
- package/package.json +8 -7
- package/src/app/api/signoz/conversations/[conversationId]/route.ts +56 -34
- package/src/components/artifact-components/form/artifact-component-form.tsx +16 -7
- package/src/components/data-components/form/data-component-form.tsx +16 -7
- package/src/components/graph/configuration/node-types.tsx +2 -4
- package/src/components/graph/graph.tsx +4 -26
- package/src/components/graph/nodes/agent-node.tsx +1 -1
- package/src/components/graph/nodes/external-agent-node.tsx +1 -1
- package/src/components/graph/playground/chat-widget.tsx +2 -2
- package/src/components/graph/playground/ikp-message.tsx +16 -16
- package/src/components/graph/playground/playground.tsx +5 -5
- package/src/components/graph/sidepane/metadata/metadata-editor.tsx +34 -17
- package/src/components/graph/sidepane/nodes/agent-node-editor.tsx +34 -19
- package/src/components/graph/sidepane/nodes/external-agent-node-editor.tsx +31 -11
- package/src/components/graph/sidepane/nodes/mcp-node-editor.tsx +4 -9
- package/src/components/graph/sidepane/nodes/model-section.tsx +1 -1
- package/src/components/graph/toolbar/toolbar.tsx +1 -1
- package/src/components/mcp-servers/form/active-tools-selector.tsx +4 -2
- package/src/components/projects/form/project-form.tsx +18 -9
- package/src/components/projects/form/project-models-section.tsx +51 -23
- package/src/components/projects/form/project-stopwhen-section.tsx +25 -11
- package/src/components/traces/ai-calls-breakdown.tsx +1 -1
- package/src/components/traces/charts/area-chart-card.tsx +2 -2
- package/src/components/traces/charts/area-chart.tsx +2 -2
- package/src/components/traces/charts/chart-card.tsx +4 -4
- package/src/components/traces/conversation-detail.tsx +10 -8
- package/src/components/traces/conversation-stats/conversation-list-item.tsx +48 -37
- package/src/components/traces/conversation-stats/conversation-stats-card.tsx +1 -1
- package/src/components/traces/filters/date-picker.tsx +6 -6
- package/src/components/traces/filters/filter-trigger.tsx +1 -1
- package/src/components/traces/filters/graph-filter.tsx +3 -3
- package/src/components/traces/timeline/activity-details-sidepane.tsx +1 -1
- package/src/components/traces/timeline/activity-timeline.tsx +1 -1
- package/src/components/traces/timeline/blocks.tsx +2 -2
- package/src/components/traces/timeline/render-panel-content.tsx +11 -11
- package/src/components/traces/timeline/timeline-item.tsx +36 -22
- package/src/components/traces/timeline/timeline-wrapper.tsx +11 -12
- package/src/components/traces/traces-overview.tsx +3 -3
- package/src/components/ui/alert.tsx +17 -23
- package/src/components/ui/calendar.tsx +3 -4
- package/src/components/ui/external-link.tsx +2 -2
- package/src/components/ui/inheritance-indicator.tsx +20 -17
- package/src/components/ui/resizable.tsx +13 -18
- package/src/constants/page-descriptions.tsx +2 -5
- package/src/constants/signoz.ts +15 -18
- package/src/features/graph/domain/__tests__/roundtrip.test.ts +5 -5
- package/src/features/graph/domain/serialize.ts +8 -9
- package/src/hooks/use-auto-prefill-id-zustand.ts +68 -0
- package/src/hooks/use-auto-prefill-id.ts +36 -0
- package/src/hooks/use-chat-activities-polling.ts +1 -1
- package/src/hooks/use-graph-errors.ts +2 -1
- package/src/hooks/use-project-data.ts +2 -2
- package/src/lib/actions/graph-full.ts +6 -2
- package/src/lib/actions/projects.ts +1 -1
- package/src/lib/api/api-config.ts +6 -6
- package/src/lib/api/api-keys.ts +4 -1
- package/src/lib/api/credentials.ts +1 -1
- package/src/lib/api/data-components.ts +1 -1
- package/src/lib/api/graph-full-client.ts +6 -3
- package/src/lib/api/projects.ts +1 -1
- package/src/lib/api/signoz-sql.ts +1 -1
- package/src/lib/index.ts +1 -1
- package/src/lib/logger.ts +1 -2
- package/src/lib/utils/generate-id.ts +14 -0
- package/tsconfig.json +2 -2
- package/eslint.config.mjs +0 -14
package/.env.example
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
NEXT_PUBLIC_TENANT_ID="inkeep"
|
|
2
|
-
|
|
3
|
-
|
|
2
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL="http://localhost:3002" # URL where agents-manage-api is running
|
|
3
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL="http://localhost:3003" # URL where agents-run-api is running
|
|
4
4
|
NEXT_PUBLIC_INKEEP_AUTH_TOKEN=""
|
|
5
5
|
NEXT_PUBLIC_DOCS_BASE_URL=""
|
|
6
6
|
NANGO_SECRET_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.2 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,32 +12,32 @@
|
|
|
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 [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
|
|
17
|
-
[?25l [37m[1m [22m[39m
|
|
18
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
19
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
20
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
21
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
22
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
23
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
24
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
25
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
26
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
27
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
28
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
29
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
30
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
31
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
32
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
33
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
34
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
35
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
36
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
37
|
-
NEXT_PUBLIC_INKEEP_MANAGEMENT_API_URL is not set, falling back to: http://localhost:3002
|
|
38
|
-
NEXT_PUBLIC_INKEEP_EXECUTION_API_URL is not set, falling back to: http://localhost:3003
|
|
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 [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
|
|
39
17
|
[32m[1m✓[22m[39m Checking validity of types
|
|
18
|
+
[?25l [37m[1m [22m[39m Collecting page data [36m.[39m[2K[1G [37m[1m [22m[39m Collecting page data [36m..[39mNEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
19
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
20
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
21
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
22
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
23
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
24
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
25
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
26
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
27
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
28
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
29
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
30
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
31
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
32
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
33
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
34
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
35
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
36
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
37
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
38
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
39
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
40
40
|
[2K[1G[?25h [37m[1m [22m[39m Collecting page data
|
|
41
41
|
[32m[1m✓[22m[39m Collecting page data
|
|
42
|
-
[?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[?
|
|
43
|
-
|
|
42
|
+
[?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_AGENTS_MANAGE_API_URL is not set, falling back to: http://localhost:3002
|
|
43
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL is not set, falling back to: http://localhost:3003
|
|
44
44
|
NEXT_PUBLIC_TENANT_ID is not set, using default tenantId: default
|
|
45
45
|
[?25h [32m[1m✓[22m[39m Generating static pages (7/7)
|
|
46
46
|
[?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
|
|
47
47
|
[32m[1m✓[22m[39m Collecting build traces
|
|
@@ -51,8 +51,8 @@ NEXT_PUBLIC_TENANT_ID is not set, using default tenantId: default
|
|
|
51
51
|
├ ƒ /[tenantId]/projects/[projectId] 142 B [37m[1m105 kB[22m[39m
|
|
52
52
|
├ ƒ /[tenantId]/projects/[projectId]/api-keys 8.73 kB [37m[1m213 kB[22m[39m
|
|
53
53
|
├ ƒ /[tenantId]/projects/[projectId]/artifact-components 1.31 kB [37m[1m168 kB[22m[39m
|
|
54
|
-
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/[artifactComponentId] 1.
|
|
55
|
-
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/new 1.
|
|
54
|
+
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/[artifactComponentId] 1.59 kB [37m[1m341 kB[22m[39m
|
|
55
|
+
├ ƒ /[tenantId]/projects/[projectId]/artifact-components/new 1.59 kB [37m[1m341 kB[22m[39m
|
|
56
56
|
├ ƒ /[tenantId]/projects/[projectId]/credentials 1.77 kB [37m[1m174 kB[22m[39m
|
|
57
57
|
├ ƒ /[tenantId]/projects/[projectId]/credentials/[credentialId] 3.92 kB [37m[1m184 kB[22m[39m
|
|
58
58
|
├ ƒ /[tenantId]/projects/[projectId]/credentials/new 206 B [37m[1m147 kB[22m[39m
|
|
@@ -60,8 +60,8 @@ NEXT_PUBLIC_TENANT_ID is not set, using default tenantId: default
|
|
|
60
60
|
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/providers 3.15 kB [37m[1m155 kB[22m[39m
|
|
61
61
|
├ ƒ /[tenantId]/projects/[projectId]/credentials/new/providers/[providerId] 10.7 kB [37m[1m212 kB[22m[39m
|
|
62
62
|
├ ƒ /[tenantId]/projects/[projectId]/data-components 1.31 kB [37m[1m168 kB[22m[39m
|
|
63
|
-
├ ƒ /[tenantId]/projects/[projectId]/data-components/[dataComponentId]
|
|
64
|
-
├ ƒ /[tenantId]/projects/[projectId]/data-components/new
|
|
63
|
+
├ ƒ /[tenantId]/projects/[projectId]/data-components/[dataComponentId] 1.5 kB [37m[1m341 kB[22m[39m
|
|
64
|
+
├ ƒ /[tenantId]/projects/[projectId]/data-components/new 1.5 kB [37m[1m341 kB[22m[39m
|
|
65
65
|
├ ƒ /[tenantId]/projects/[projectId]/graphs 1.29 kB [37m[1m168 kB[22m[39m
|
|
66
66
|
├ ƒ /[tenantId]/projects/[projectId]/graphs/[graphId] 199 B [37m[1m984 kB[22m[39m
|
|
67
67
|
├ ƒ /[tenantId]/projects/[projectId]/graphs/new 199 B [37m[1m984 kB[22m[39m
|
package/.turbo/turbo-test.log
CHANGED
|
@@ -1,66 +1,33 @@
|
|
|
1
1
|
|
|
2
2
|
|
|
3
|
-
> @inkeep/agents-manage-ui@0.1.
|
|
3
|
+
> @inkeep/agents-manage-ui@0.1.2 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
|
|
18
10
|
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m [queued][22m
|
|
19
11
|
|
|
20
12
|
[2m Test Files [22m[1m[32m0 passed[39m[22m[90m (3)[39m
|
|
21
13
|
[2m Tests [22m[1m[32m0 passed[39m[22m[90m (0)[39m
|
|
22
|
-
[2m Start at [22m16:
|
|
23
|
-
[2m Duration [
|
|
24
|
-
[?2026l[?2026h[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
|
|
14
|
+
[2m Start at [22m16:07:15
|
|
15
|
+
[2m Duration [22m106ms
|
|
16
|
+
[?2026l[?2026h[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
|
|
43
17
|
|
|
44
18
|
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/roundtrip.test.ts[2m 0/1[22m
|
|
45
19
|
[1m[33m ❯ [39m[22msrc/features/graph/domain/__tests__/serialize.test.ts[2m [queued][22m
|
|
46
20
|
|
|
47
21
|
[2m Test Files [22m[1m[32m1 passed[39m[22m[90m (3)[39m
|
|
48
22
|
[2m Tests [22m[1m[32m22 passed[39m[22m[90m (23)[39m
|
|
49
|
-
[2m Start at [22m16:
|
|
50
|
-
[2m Duration [
|
|
51
|
-
[?2026l[
|
|
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
|
|
23
|
+
[2m Start at [22m16:07:15
|
|
24
|
+
[2m Duration [22m307ms
|
|
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__/serialize.test.ts [2m([22m[2m7 tests[22m[2m)[22m[32m 3[2mms[22m[39m
|
|
26
|
+
[32m✓[39m src/features/graph/domain/__tests__/roundtrip.test.ts [2m([22m[2m1 test[22m[2m)[22m[32m 8[2mms[22m[39m
|
|
60
27
|
|
|
61
28
|
[2m Test Files [22m [1m[32m3 passed[39m[22m[90m (3)[39m
|
|
62
29
|
[2m Tests [22m [1m[32m30 passed[39m[22m[90m (30)[39m
|
|
63
|
-
[2m Start at [22m 16:
|
|
64
|
-
[2m Duration [22m
|
|
30
|
+
[2m Start at [22m 16:07:15
|
|
31
|
+
[2m Duration [22m 431ms[2m (transform 100ms, setup 0ms, collect 482ms, tests 23ms, environment 0ms, prepare 134ms)[22m
|
|
65
32
|
|
|
66
33
|
[?25h
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@ This is a [Next.js](https://nextjs.org) project bootstrapped with [`create-next-
|
|
|
2
2
|
|
|
3
3
|
## Agent Builder
|
|
4
4
|
|
|
5
|
-
This application provides a UI for building and managing agent graphs. It integrates with the
|
|
5
|
+
This application provides a UI for building and managing agent graphs. It integrates with the agents-manage-api and agents-run-api backend services to provide full CRUD operations for agent graph management and real-time chat execution.
|
|
6
6
|
|
|
7
7
|
### Features
|
|
8
8
|
|
|
@@ -48,8 +48,8 @@ Create a `.env.local` file with the following configuration:
|
|
|
48
48
|
```bash
|
|
49
49
|
# Inkeep Configuration
|
|
50
50
|
NEXT_PUBLIC_TENANT_ID="inkeep"
|
|
51
|
-
|
|
52
|
-
|
|
51
|
+
NEXT_PUBLIC_INKEEP_AGENTS_MANAGE_API_URL="http://localhost:3002" # URL where agents-manage-api is running
|
|
52
|
+
NEXT_PUBLIC_INKEEP_AGENTS_RUN_API_URL="http://localhost:3003" # URL where agents-run-api is running
|
|
53
53
|
NEXT_PUBLIC_INKEEP_AUTH_TOKEN=""
|
|
54
54
|
|
|
55
55
|
# SigNoz Configuration (for Traces feature)
|
package/biome.json
ADDED
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.3",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
5
5
|
"dependencies": {
|
|
6
6
|
"@ai-sdk/react": "2.0.11",
|
|
@@ -58,12 +58,11 @@
|
|
|
58
58
|
"zod": "^3.25.76",
|
|
59
59
|
"zustand": "^5.0.7",
|
|
60
60
|
"@inkeep/agents-manage-api": "^0.1.2",
|
|
61
|
-
"@inkeep/agents-
|
|
62
|
-
"@inkeep/agents-
|
|
61
|
+
"@inkeep/agents-core": "^0.1.4",
|
|
62
|
+
"@inkeep/agents-run-api": "^0.1.3"
|
|
63
63
|
},
|
|
64
64
|
"devDependencies": {
|
|
65
65
|
"@biomejs/biome": "2.1.4",
|
|
66
|
-
"@eslint/eslintrc": "^3",
|
|
67
66
|
"@tailwindcss/postcss": "^4",
|
|
68
67
|
"@testing-library/jest-dom": "^6.8.0",
|
|
69
68
|
"@testing-library/react": "^16.3.0",
|
|
@@ -72,8 +71,6 @@
|
|
|
72
71
|
"@types/react": "^19",
|
|
73
72
|
"@types/react-dom": "^19",
|
|
74
73
|
"@vitest/coverage-v8": "^3.2.4",
|
|
75
|
-
"eslint": "^9",
|
|
76
|
-
"eslint-config-next": "15.5.2",
|
|
77
74
|
"jsdom": "^26.1.0",
|
|
78
75
|
"tailwind-scrollbar": "^4.0.2",
|
|
79
76
|
"tailwindcss": "^4",
|
|
@@ -81,11 +78,15 @@
|
|
|
81
78
|
"typescript": "^5",
|
|
82
79
|
"vitest": "^3.2.4"
|
|
83
80
|
},
|
|
81
|
+
"engines": {
|
|
82
|
+
"node": ">=22.0.0"
|
|
83
|
+
},
|
|
84
84
|
"scripts": {
|
|
85
85
|
"dev": "next dev -p 3000",
|
|
86
86
|
"build": "next build",
|
|
87
87
|
"start": "next start",
|
|
88
|
-
"lint": "
|
|
88
|
+
"lint": "biome check",
|
|
89
|
+
"format": "biome check --write",
|
|
89
90
|
"typecheck": "tsc --noEmit",
|
|
90
91
|
"test": "vitest --run",
|
|
91
92
|
"test:coverage": "vitest --run --coverage"
|
|
@@ -1,14 +1,33 @@
|
|
|
1
|
-
import { type NextRequest, NextResponse } from 'next/server';
|
|
2
|
-
import { fetchAllSpanAttributes_SQL } from '@/lib/api/signoz-sql';
|
|
3
1
|
import axios from 'axios';
|
|
4
2
|
import axiosRetry from 'axios-retry';
|
|
5
|
-
import {
|
|
3
|
+
import { type NextRequest, NextResponse } from 'next/server';
|
|
4
|
+
import {
|
|
5
|
+
ACTIVITY_NAMES,
|
|
6
|
+
ACTIVITY_STATUS,
|
|
7
|
+
ACTIVITY_TYPES,
|
|
8
|
+
AGENT_IDS,
|
|
9
|
+
AGGREGATE_OPERATORS,
|
|
10
|
+
AI_OPERATIONS,
|
|
11
|
+
DATA_SOURCES,
|
|
12
|
+
OPERATORS,
|
|
13
|
+
ORDER_DIRECTIONS,
|
|
14
|
+
PANEL_TYPES,
|
|
15
|
+
QUERY_DEFAULTS,
|
|
16
|
+
QUERY_EXPRESSIONS,
|
|
17
|
+
QUERY_FIELD_CONFIGS,
|
|
18
|
+
QUERY_TYPES,
|
|
19
|
+
SPAN_KEYS,
|
|
20
|
+
SPAN_NAMES,
|
|
21
|
+
TOOL_NAMES,
|
|
22
|
+
UNKNOWN_VALUE,
|
|
23
|
+
} from '@/constants/signoz';
|
|
24
|
+
import { fetchAllSpanAttributes_SQL } from '@/lib/api/signoz-sql';
|
|
6
25
|
import { getLogger } from '@/lib/logger';
|
|
7
26
|
|
|
8
27
|
// Configure axios retry
|
|
9
|
-
axiosRetry(axios, {
|
|
28
|
+
axiosRetry(axios, {
|
|
10
29
|
retries: 3,
|
|
11
|
-
retryDelay: axiosRetry.exponentialDelay
|
|
30
|
+
retryDelay: axiosRetry.exponentialDelay,
|
|
12
31
|
});
|
|
13
32
|
|
|
14
33
|
export const dynamic = 'force-dynamic';
|
|
@@ -16,8 +35,6 @@ export const dynamic = 'force-dynamic';
|
|
|
16
35
|
const SIGNOZ_URL = process.env.SIGNOZ_URL || 'http://localhost:3080';
|
|
17
36
|
const SIGNOZ_API_KEY = process.env.SIGNOZ_API_KEY || '';
|
|
18
37
|
|
|
19
|
-
|
|
20
|
-
|
|
21
38
|
// ---------- Types
|
|
22
39
|
|
|
23
40
|
type SigNozListItem = { data?: Record<string, any>; [k: string]: any };
|
|
@@ -27,8 +44,6 @@ type SigNozResp = {
|
|
|
27
44
|
|
|
28
45
|
const START_2020_MS = new Date('2020-01-01T00:00:00Z').getTime();
|
|
29
46
|
|
|
30
|
-
|
|
31
|
-
|
|
32
47
|
function getField(span: SigNozListItem, key: string) {
|
|
33
48
|
const d = span?.data ?? span;
|
|
34
49
|
return d?.[key] ?? span?.[key];
|
|
@@ -58,12 +73,15 @@ async function signozQuery(payload: any): Promise<SigNozResp> {
|
|
|
58
73
|
timeout: 30000,
|
|
59
74
|
});
|
|
60
75
|
const json = response.data as SigNozResp;
|
|
61
|
-
const responseData = json?.data?.result?.map((r) => ({
|
|
76
|
+
const responseData = json?.data?.result?.map((r) => ({
|
|
77
|
+
queryName: r.queryName,
|
|
78
|
+
count: r.list?.length,
|
|
79
|
+
}));
|
|
62
80
|
logger.info({ responseData }, 'SigNoz response (truncated)');
|
|
63
81
|
return json;
|
|
64
82
|
} catch (e) {
|
|
65
83
|
logger.error({ error: e }, 'SigNoz query error');
|
|
66
|
-
|
|
84
|
+
|
|
67
85
|
// Re-throw the error with more context for proper error handling
|
|
68
86
|
if (axios.isAxiosError(e)) {
|
|
69
87
|
if (e.code === 'ECONNREFUSED' || e.code === 'ENOTFOUND' || e.code === 'ETIMEDOUT') {
|
|
@@ -233,7 +251,7 @@ function buildConversationListPayload(
|
|
|
233
251
|
key: { key: SPAN_KEYS.HAS_ERROR, ...QUERY_FIELD_CONFIGS.BOOL_TAG_COLUMN },
|
|
234
252
|
op: OPERATORS.EQUALS,
|
|
235
253
|
value: true,
|
|
236
|
-
},
|
|
254
|
+
},
|
|
237
255
|
],
|
|
238
256
|
[
|
|
239
257
|
{ key: SPAN_KEYS.SPAN_ID, ...QUERY_FIELD_CONFIGS.STRING_TAG_COLUMN },
|
|
@@ -254,7 +272,7 @@ function buildConversationListPayload(
|
|
|
254
272
|
key: { key: SPAN_KEYS.HAS_ERROR, ...QUERY_FIELD_CONFIGS.BOOL_TAG_COLUMN },
|
|
255
273
|
op: OPERATORS.EQUALS,
|
|
256
274
|
value: true,
|
|
257
|
-
},
|
|
275
|
+
},
|
|
258
276
|
],
|
|
259
277
|
[
|
|
260
278
|
{ key: SPAN_KEYS.SPAN_ID, ...QUERY_FIELD_CONFIGS.STRING_TAG_COLUMN },
|
|
@@ -382,10 +400,9 @@ function buildConversationListPayload(
|
|
|
382
400
|
]
|
|
383
401
|
),
|
|
384
402
|
|
|
385
|
-
|
|
386
403
|
durationSpans: listQuery(
|
|
387
404
|
QUERY_EXPRESSIONS.DURATION_SPANS,
|
|
388
|
-
[],
|
|
405
|
+
[],
|
|
389
406
|
[
|
|
390
407
|
{ key: SPAN_KEYS.TRACE_ID, ...QUERY_FIELD_CONFIGS.STRING_TAG_COLUMN },
|
|
391
408
|
{ key: SPAN_KEYS.PARENT_SPAN_ID, ...QUERY_FIELD_CONFIGS.STRING_TAG_COLUMN },
|
|
@@ -586,7 +603,8 @@ export async function GET(
|
|
|
586
603
|
for (const span of contextResolutionSpans) {
|
|
587
604
|
const hasError = getField(span, SPAN_KEYS.HAS_ERROR) === true;
|
|
588
605
|
const statusMessage =
|
|
589
|
-
getString(span, SPAN_KEYS.STATUS_MESSAGE) ||
|
|
606
|
+
getString(span, SPAN_KEYS.STATUS_MESSAGE) ||
|
|
607
|
+
getString(span, SPAN_KEYS.OTEL_STATUS_DESCRIPTION, '');
|
|
590
608
|
|
|
591
609
|
// context keys maybe JSON
|
|
592
610
|
let keys: string[] | undefined;
|
|
@@ -615,7 +633,8 @@ export async function GET(
|
|
|
615
633
|
for (const span of contextHandleSpans) {
|
|
616
634
|
const hasError = getField(span, SPAN_KEYS.HAS_ERROR) === true;
|
|
617
635
|
const statusMessage =
|
|
618
|
-
getString(span, SPAN_KEYS.STATUS_MESSAGE) ||
|
|
636
|
+
getString(span, SPAN_KEYS.STATUS_MESSAGE) ||
|
|
637
|
+
getString(span, SPAN_KEYS.OTEL_STATUS_DESCRIPTION, '');
|
|
619
638
|
|
|
620
639
|
// context keys maybe JSON
|
|
621
640
|
let keys: string[] | undefined;
|
|
@@ -687,7 +706,7 @@ export async function GET(
|
|
|
687
706
|
type: ACTIVITY_TYPES.AI_ASSISTANT_MESSAGE,
|
|
688
707
|
name: ACTIVITY_NAMES.AI_ASSISTANT_MESSAGE,
|
|
689
708
|
description: 'AI Assistant responded',
|
|
690
|
-
timestamp:getString(span, SPAN_KEYS.AI_RESPONSE_TIMESTAMP),
|
|
709
|
+
timestamp: getString(span, SPAN_KEYS.AI_RESPONSE_TIMESTAMP),
|
|
691
710
|
status: hasError ? ACTIVITY_STATUS.ERROR : ACTIVITY_STATUS.SUCCESS,
|
|
692
711
|
agentId: AGENT_IDS.AI_ASSISTANT,
|
|
693
712
|
agentName: getString(span, SPAN_KEYS.AI_AGENT_NAME_ALT, ACTIVITY_NAMES.UNKNOWN_AGENT),
|
|
@@ -708,7 +727,7 @@ export async function GET(
|
|
|
708
727
|
type: ACTIVITY_TYPES.AI_GENERATION,
|
|
709
728
|
name: ACTIVITY_NAMES.AI_TEXT_GENERATION,
|
|
710
729
|
description: 'AI model generating text response',
|
|
711
|
-
timestamp:span.timestamp,
|
|
730
|
+
timestamp: span.timestamp,
|
|
712
731
|
status: hasError ? ACTIVITY_STATUS.ERROR : ACTIVITY_STATUS.SUCCESS,
|
|
713
732
|
agentId: getString(span, SPAN_KEYS.AGENT_ID, '') || undefined,
|
|
714
733
|
agentName: getString(span, SPAN_KEYS.AI_TELEMETRY_FUNCTION_ID, '') || undefined,
|
|
@@ -747,7 +766,6 @@ export async function GET(
|
|
|
747
766
|
|
|
748
767
|
// context fetchers
|
|
749
768
|
for (const span of contextFetcherSpans) {
|
|
750
|
-
|
|
751
769
|
const hasError = getField(span, SPAN_KEYS.HAS_ERROR) === true;
|
|
752
770
|
activities.push({
|
|
753
771
|
id: getString(span, SPAN_KEYS.SPAN_ID, ''),
|
|
@@ -758,7 +776,9 @@ export async function GET(
|
|
|
758
776
|
status: hasError ? ACTIVITY_STATUS.ERROR : ACTIVITY_STATUS.SUCCESS,
|
|
759
777
|
agentId: UNKNOWN_VALUE,
|
|
760
778
|
agentName: 'Context Fetcher',
|
|
761
|
-
result: hasError
|
|
779
|
+
result: hasError
|
|
780
|
+
? 'Context fetch failed'
|
|
781
|
+
: getString(span, SPAN_KEYS.HTTP_URL, 'Unknown URL'),
|
|
762
782
|
});
|
|
763
783
|
}
|
|
764
784
|
|
|
@@ -796,13 +816,15 @@ export async function GET(
|
|
|
796
816
|
let totalOutputTokens = 0;
|
|
797
817
|
for (const activity of activities) {
|
|
798
818
|
if (
|
|
799
|
-
(activity.type === ACTIVITY_TYPES.AI_GENERATION ||
|
|
819
|
+
(activity.type === ACTIVITY_TYPES.AI_GENERATION ||
|
|
820
|
+
activity.type === ACTIVITY_TYPES.AI_MODEL_STREAMED_TEXT) &&
|
|
800
821
|
typeof activity.inputTokens === 'number'
|
|
801
822
|
) {
|
|
802
823
|
totalInputTokens += activity.inputTokens;
|
|
803
824
|
}
|
|
804
825
|
if (
|
|
805
|
-
(activity.type === ACTIVITY_TYPES.AI_GENERATION ||
|
|
826
|
+
(activity.type === ACTIVITY_TYPES.AI_GENERATION ||
|
|
827
|
+
activity.type === ACTIVITY_TYPES.AI_MODEL_STREAMED_TEXT) &&
|
|
806
828
|
typeof activity.outputTokens === 'number'
|
|
807
829
|
) {
|
|
808
830
|
totalOutputTokens += activity.outputTokens;
|
|
@@ -811,10 +833,6 @@ export async function GET(
|
|
|
811
833
|
|
|
812
834
|
const openAICallsCount = aiGenerationSpans.length;
|
|
813
835
|
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
836
|
let allSpanAttributes: Array<{
|
|
819
837
|
spanId: string;
|
|
820
838
|
traceId: string;
|
|
@@ -832,7 +850,6 @@ export async function GET(
|
|
|
832
850
|
logger.error({ error: e }, 'allSpanAttributes SQL fetch skipped/failed');
|
|
833
851
|
}
|
|
834
852
|
|
|
835
|
-
|
|
836
853
|
const conversation = {
|
|
837
854
|
conversationId,
|
|
838
855
|
startTime: conversationStartTime ? conversationStartTime : null,
|
|
@@ -841,11 +858,15 @@ export async function GET(
|
|
|
841
858
|
totalMessages: (() => {
|
|
842
859
|
let count = 0;
|
|
843
860
|
for (const a of activities) {
|
|
844
|
-
if (
|
|
861
|
+
if (
|
|
862
|
+
a.type === ACTIVITY_TYPES.USER_MESSAGE ||
|
|
863
|
+
a.type === ACTIVITY_TYPES.AI_ASSISTANT_MESSAGE
|
|
864
|
+
)
|
|
865
|
+
count++;
|
|
845
866
|
}
|
|
846
867
|
return count;
|
|
847
868
|
})(),
|
|
848
|
-
totalToolCalls: activities.filter(a => a.type === ACTIVITY_TYPES.TOOL_CALL).length,
|
|
869
|
+
totalToolCalls: activities.filter((a) => a.type === ACTIVITY_TYPES.TOOL_CALL).length,
|
|
849
870
|
totalErrors: errorCount,
|
|
850
871
|
totalOpenAICalls: openAICallsCount,
|
|
851
872
|
};
|
|
@@ -868,7 +889,7 @@ export async function GET(
|
|
|
868
889
|
conversationDuration: conversationDurationMs,
|
|
869
890
|
totalInputTokens,
|
|
870
891
|
totalOutputTokens,
|
|
871
|
-
mcpToolErrors: [],
|
|
892
|
+
mcpToolErrors: [],
|
|
872
893
|
contextErrors,
|
|
873
894
|
agentGenerationErrors,
|
|
874
895
|
graphId,
|
|
@@ -878,10 +899,11 @@ export async function GET(
|
|
|
878
899
|
} catch (error) {
|
|
879
900
|
const logger = getLogger('conversation-details');
|
|
880
901
|
logger.error({ error }, 'Error fetching conversation details');
|
|
881
|
-
|
|
902
|
+
|
|
882
903
|
// Provide more specific error responses based on the error type
|
|
883
|
-
const errorMessage =
|
|
884
|
-
|
|
904
|
+
const errorMessage =
|
|
905
|
+
error instanceof Error ? error.message : 'Failed to fetch conversation details';
|
|
906
|
+
|
|
885
907
|
if (errorMessage.includes('SigNoz service unavailable')) {
|
|
886
908
|
return NextResponse.json({ error: errorMessage }, { status: 503 });
|
|
887
909
|
}
|
|
@@ -9,6 +9,7 @@ import { GenericTextarea } from '@/components/form/generic-textarea';
|
|
|
9
9
|
import { JsonSchemaInput } from '@/components/form/json-schema-input';
|
|
10
10
|
import { Button } from '@/components/ui/button';
|
|
11
11
|
import { Form } from '@/components/ui/form';
|
|
12
|
+
import { useAutoPrefillId } from '@/hooks/use-auto-prefill-id';
|
|
12
13
|
import {
|
|
13
14
|
createArtifactComponentAction,
|
|
14
15
|
updateArtifactComponentAction,
|
|
@@ -52,6 +53,14 @@ export function ArtifactComponentForm({
|
|
|
52
53
|
const { isSubmitting } = form.formState;
|
|
53
54
|
const router = useRouter();
|
|
54
55
|
|
|
56
|
+
// Auto-prefill ID based on name field (only for new components)
|
|
57
|
+
useAutoPrefillId({
|
|
58
|
+
form,
|
|
59
|
+
nameField: 'name',
|
|
60
|
+
idField: 'id',
|
|
61
|
+
isEditing: !!id,
|
|
62
|
+
});
|
|
63
|
+
|
|
55
64
|
const onSubmit = async (data: ArtifactComponentFormData) => {
|
|
56
65
|
try {
|
|
57
66
|
const payload = { ...data } as ArtifactComponent;
|
|
@@ -81,6 +90,13 @@ export function ArtifactComponentForm({
|
|
|
81
90
|
return (
|
|
82
91
|
<Form {...form}>
|
|
83
92
|
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
|
|
93
|
+
<GenericInput
|
|
94
|
+
control={form.control}
|
|
95
|
+
name="name"
|
|
96
|
+
label="Name"
|
|
97
|
+
placeholder="Document Artifact"
|
|
98
|
+
isRequired
|
|
99
|
+
/>
|
|
84
100
|
<GenericInput
|
|
85
101
|
control={form.control}
|
|
86
102
|
name="id"
|
|
@@ -94,13 +110,6 @@ export function ArtifactComponentForm({
|
|
|
94
110
|
: 'Choose a unique identifier for this component. Using an existing id will replace that component.'
|
|
95
111
|
}
|
|
96
112
|
/>
|
|
97
|
-
<GenericInput
|
|
98
|
-
control={form.control}
|
|
99
|
-
name="name"
|
|
100
|
-
label="Name"
|
|
101
|
-
placeholder="Document Artifact"
|
|
102
|
-
isRequired
|
|
103
|
-
/>
|
|
104
113
|
<GenericTextarea
|
|
105
114
|
control={form.control}
|
|
106
115
|
name="description"
|
|
@@ -9,6 +9,7 @@ import { GenericTextarea } from '@/components/form/generic-textarea';
|
|
|
9
9
|
import { JsonSchemaInput } from '@/components/form/json-schema-input';
|
|
10
10
|
import { Button } from '@/components/ui/button';
|
|
11
11
|
import { Form } from '@/components/ui/form';
|
|
12
|
+
import { useAutoPrefillId } from '@/hooks/use-auto-prefill-id';
|
|
12
13
|
import {
|
|
13
14
|
createDataComponentAction,
|
|
14
15
|
updateDataComponentAction,
|
|
@@ -49,6 +50,14 @@ export function DataComponentForm({
|
|
|
49
50
|
const { isSubmitting } = form.formState;
|
|
50
51
|
const router = useRouter();
|
|
51
52
|
|
|
53
|
+
// Auto-prefill ID based on name field (only for new components)
|
|
54
|
+
useAutoPrefillId({
|
|
55
|
+
form,
|
|
56
|
+
nameField: 'name',
|
|
57
|
+
idField: 'id',
|
|
58
|
+
isEditing: !!id,
|
|
59
|
+
});
|
|
60
|
+
|
|
52
61
|
const onSubmit = async (data: DataComponentFormData) => {
|
|
53
62
|
try {
|
|
54
63
|
const payload = { ...data } as DataComponent;
|
|
@@ -78,6 +87,13 @@ export function DataComponentForm({
|
|
|
78
87
|
return (
|
|
79
88
|
<Form {...form}>
|
|
80
89
|
<form onSubmit={form.handleSubmit(onSubmit)} className="space-y-8">
|
|
90
|
+
<GenericInput
|
|
91
|
+
control={form.control}
|
|
92
|
+
name="name"
|
|
93
|
+
label="Name"
|
|
94
|
+
placeholder="List orders"
|
|
95
|
+
isRequired
|
|
96
|
+
/>
|
|
81
97
|
<GenericInput
|
|
82
98
|
control={form.control}
|
|
83
99
|
name="id"
|
|
@@ -91,13 +107,6 @@ export function DataComponentForm({
|
|
|
91
107
|
}
|
|
92
108
|
isRequired
|
|
93
109
|
/>
|
|
94
|
-
<GenericInput
|
|
95
|
-
control={form.control}
|
|
96
|
-
name="name"
|
|
97
|
-
label="Name"
|
|
98
|
-
placeholder="List orders"
|
|
99
|
-
isRequired
|
|
100
|
-
/>
|
|
101
110
|
<GenericTextarea
|
|
102
111
|
control={form.control}
|
|
103
112
|
name="description"
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import type { Node } from '@xyflow/react';
|
|
2
1
|
import { Bot, BotMessageSquare, Hammer } from 'lucide-react';
|
|
3
|
-
import { nanoid } from 'nanoid';
|
|
4
2
|
import type { MCPTool } from '@/lib/api/tools';
|
|
5
3
|
import { AgentNode } from '../nodes/agent-node';
|
|
6
4
|
import { ExternalAgentNode } from '../nodes/external-agent-node';
|
|
@@ -58,10 +56,10 @@ export const externalAgentNodeTargetHandleId = 'target-external-agent';
|
|
|
58
56
|
|
|
59
57
|
export const newNodeDefaults: Record<keyof typeof nodeTypes, NodeData> = {
|
|
60
58
|
[NodeType.Agent]: {
|
|
61
|
-
name: '
|
|
59
|
+
name: '',
|
|
62
60
|
},
|
|
63
61
|
[NodeType.ExternalAgent]: {
|
|
64
|
-
name: '
|
|
62
|
+
name: '',
|
|
65
63
|
},
|
|
66
64
|
[NodeType.MCP]: {
|
|
67
65
|
name: 'MCP',
|