@kelpie/ui 0.17.0 → 0.19.0
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/dist/api/resources/ai.d.ts +5 -0
- package/dist/api/resources/ai.d.ts.map +1 -1
- package/dist/api/resources/ai.js +9 -1
- package/dist/api/resources/ai.js.map +1 -1
- package/dist/api/resources/forms.d.ts +8 -0
- package/dist/api/resources/forms.d.ts.map +1 -1
- package/dist/api/resources/forms.js +39 -0
- package/dist/api/resources/forms.js.map +1 -1
- package/dist/api/resources/personIntake.d.ts +12 -0
- package/dist/api/resources/personIntake.d.ts.map +1 -0
- package/dist/api/resources/personIntake.js +54 -0
- package/dist/api/resources/personIntake.js.map +1 -0
- package/dist/app/KelpieApp.js +2 -2
- package/dist/app/KelpieApp.js.map +1 -1
- package/dist/components/AgentTasks.js +2 -2
- package/dist/components/AgentTasks.js.map +1 -1
- package/dist/components/AiDrawer.d.ts +13 -0
- package/dist/components/AiDrawer.d.ts.map +1 -0
- package/dist/components/AiDrawer.js +165 -0
- package/dist/components/AiDrawer.js.map +1 -0
- package/dist/components/ApiKeysPanel.js +1 -1
- package/dist/components/DataTable.js +1 -1
- package/dist/components/KanbanBoard.d.ts +5 -1
- package/dist/components/KanbanBoard.d.ts.map +1 -1
- package/dist/components/KanbanBoard.js +37 -2
- package/dist/components/KanbanBoard.js.map +1 -1
- package/dist/components/NotesPanel.js +2 -2
- package/dist/components/NotesPanel.js.map +1 -1
- package/dist/components/PageHeader.js +1 -1
- package/dist/components/PageHeader.js.map +1 -1
- package/dist/components/PersonIntakeDialog.d.ts +19 -0
- package/dist/components/PersonIntakeDialog.d.ts.map +1 -0
- package/dist/components/PersonIntakeDialog.js +87 -0
- package/dist/components/PersonIntakeDialog.js.map +1 -0
- package/dist/components/PersonIntakePanel.d.ts +21 -0
- package/dist/components/PersonIntakePanel.d.ts.map +1 -0
- package/dist/components/PersonIntakePanel.js +76 -0
- package/dist/components/PersonIntakePanel.js.map +1 -0
- package/dist/components/SegmentedControl.js +2 -2
- package/dist/components/SegmentedControl.js.map +1 -1
- package/dist/components/Shell.d.ts.map +1 -1
- package/dist/components/Shell.js +40 -4
- package/dist/components/Shell.js.map +1 -1
- package/dist/components/WorkspaceSwitcher.d.ts.map +1 -1
- package/dist/components/WorkspaceSwitcher.js +10 -2
- package/dist/components/WorkspaceSwitcher.js.map +1 -1
- package/dist/components/aiDrawerState.d.ts +45 -0
- package/dist/components/aiDrawerState.d.ts.map +1 -0
- package/dist/components/aiDrawerState.js +14 -0
- package/dist/components/aiDrawerState.js.map +1 -0
- package/dist/components/personIntakeTask.d.ts +5 -0
- package/dist/components/personIntakeTask.d.ts.map +1 -0
- package/dist/components/personIntakeTask.js +13 -0
- package/dist/components/personIntakeTask.js.map +1 -0
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -2
- package/dist/index.js.map +1 -1
- package/dist/lib/mediaQuery.d.ts +9 -0
- package/dist/lib/mediaQuery.d.ts.map +1 -0
- package/dist/lib/mediaQuery.js +24 -0
- package/dist/lib/mediaQuery.js.map +1 -0
- package/dist/modules/PersonIntakeWizard.d.ts +3 -0
- package/dist/modules/PersonIntakeWizard.d.ts.map +1 -0
- package/dist/modules/PersonIntakeWizard.js +227 -0
- package/dist/modules/PersonIntakeWizard.js.map +1 -0
- package/dist/modules/ai.d.ts +4 -3
- package/dist/modules/ai.d.ts.map +1 -1
- package/dist/modules/ai.js +10 -6
- package/dist/modules/ai.js.map +1 -1
- package/dist/modules/aiRunner.d.ts.map +1 -1
- package/dist/modules/aiRunner.js +7 -5
- package/dist/modules/aiRunner.js.map +1 -1
- package/dist/modules/personIntakeSelection.d.ts +7 -0
- package/dist/modules/personIntakeSelection.d.ts.map +1 -0
- package/dist/modules/personIntakeSelection.js +21 -0
- package/dist/modules/personIntakeSelection.js.map +1 -0
- package/dist/pages/FormDetail.d.ts.map +1 -1
- package/dist/pages/FormDetail.js +7 -7
- package/dist/pages/FormDetail.js.map +1 -1
- package/dist/pages/FormsPage.js +4 -4
- package/dist/pages/FormsPage.js.map +1 -1
- package/dist/pages/ListDetail.d.ts.map +1 -1
- package/dist/pages/ListDetail.js +2 -2
- package/dist/pages/ListDetail.js.map +1 -1
- package/dist/pages/PeoplePage.d.ts.map +1 -1
- package/dist/pages/PeoplePage.js +9 -1
- package/dist/pages/PeoplePage.js.map +1 -1
- package/dist/pages/RoleDetail.d.ts.map +1 -1
- package/dist/pages/RoleDetail.js +3 -3
- package/dist/pages/RoleDetail.js.map +1 -1
- package/dist/pages/account/ConnectedAppsPage.js +1 -1
- package/dist/pages/admin/AiAdminPage.d.ts +2 -0
- package/dist/pages/admin/AiAdminPage.d.ts.map +1 -0
- package/dist/pages/admin/AiAdminPage.js +19 -0
- package/dist/pages/admin/AiAdminPage.js.map +1 -0
- package/dist/pages/admin/AiPage.d.ts +4 -1
- package/dist/pages/admin/AiPage.d.ts.map +1 -1
- package/dist/pages/admin/AiPage.js +77 -15
- package/dist/pages/admin/AiPage.js.map +1 -1
- package/dist/pages/admin/DataPage.js +2 -2
- package/dist/pages/admin/McpPanel.d.ts +3 -0
- package/dist/pages/admin/McpPanel.d.ts.map +1 -0
- package/dist/pages/admin/McpPanel.js +123 -0
- package/dist/pages/admin/McpPanel.js.map +1 -0
- package/dist/pages/admin/PrivacyPage.js +19 -3
- package/dist/pages/admin/PrivacyPage.js.map +1 -1
- package/dist/pages/forms/AddFieldMenu.js +2 -2
- package/dist/pages/forms/AddFieldMenu.js.map +1 -1
- package/dist/pages/forms/EmbedPanel.js +5 -2
- package/dist/pages/forms/EmbedPanel.js.map +1 -1
- package/dist/pages/forms/FieldsEditor.d.ts.map +1 -1
- package/dist/pages/forms/FieldsEditor.js +90 -8
- package/dist/pages/forms/FieldsEditor.js.map +1 -1
- package/dist/pages/forms/FormSettings.d.ts.map +1 -1
- package/dist/pages/forms/FormSettings.js +73 -6
- package/dist/pages/forms/FormSettings.js.map +1 -1
- package/dist/pages/forms/SubmissionDetail.d.ts.map +1 -1
- package/dist/pages/forms/SubmissionDetail.js +2 -1
- package/dist/pages/forms/SubmissionDetail.js.map +1 -1
- package/dist/pages/forms/SubmissionsTable.d.ts.map +1 -1
- package/dist/pages/forms/SubmissionsTable.js +2 -1
- package/dist/pages/forms/SubmissionsTable.js.map +1 -1
- package/dist/pages/forms/fieldList.d.ts +2 -2
- package/dist/pages/forms/fieldList.d.ts.map +1 -1
- package/dist/pages/forms/fieldList.js +38 -10
- package/dist/pages/forms/fieldList.js.map +1 -1
- package/dist/pages/forms/template.d.ts.map +1 -1
- package/dist/pages/forms/template.js +13 -0
- package/dist/pages/forms/template.js.map +1 -1
- package/dist/pages/handbook/HandbookPage.js +4 -4
- package/dist/pages/handbook/HandbookPage.js.map +1 -1
- package/dist/registry/context.d.ts +5 -1
- package/dist/registry/context.d.ts.map +1 -1
- package/dist/registry/context.js +8 -0
- package/dist/registry/context.js.map +1 -1
- package/dist/registry/contributions.d.ts +37 -1
- package/dist/registry/contributions.d.ts.map +1 -1
- package/dist/registry/registry.d.ts +8 -1
- package/dist/registry/registry.d.ts.map +1 -1
- package/dist/registry/registry.js +13 -0
- package/dist/registry/registry.js.map +1 -1
- package/package.json +2 -2
- package/src/api/resources/ai.ts +11 -1
- package/src/api/resources/forms.ts +56 -0
- package/src/api/resources/personIntake.ts +95 -0
- package/src/app/KelpieApp.tsx +4 -2
- package/src/components/AgentTasks.tsx +2 -2
- package/src/components/AiDrawer.tsx +272 -0
- package/src/components/ApiKeysPanel.tsx +1 -1
- package/src/components/DataTable.tsx +1 -1
- package/src/components/KanbanBoard.tsx +119 -2
- package/src/components/NotesPanel.tsx +7 -4
- package/src/components/PageHeader.tsx +1 -1
- package/src/components/PersonIntakePanel.tsx +193 -0
- package/src/components/SegmentedControl.tsx +2 -2
- package/src/components/Shell.tsx +99 -13
- package/src/components/WorkspaceSwitcher.tsx +13 -2
- package/src/components/aiDrawerState.ts +61 -0
- package/src/components/personIntakeTask.tsx +14 -0
- package/src/index.ts +12 -1
- package/src/lib/mediaQuery.ts +32 -0
- package/src/modules/PersonIntakeWizard.tsx +638 -0
- package/src/modules/ai.tsx +10 -6
- package/src/modules/aiRunner.ts +8 -5
- package/src/modules/personIntakeSelection.ts +24 -0
- package/src/pages/FormDetail.tsx +18 -14
- package/src/pages/FormsPage.tsx +4 -4
- package/src/pages/ListDetail.tsx +5 -3
- package/src/pages/PeoplePage.tsx +18 -5
- package/src/pages/RoleDetail.tsx +10 -5
- package/src/pages/account/ConnectedAppsPage.tsx +1 -1
- package/src/pages/admin/AiAdminPage.tsx +52 -0
- package/src/pages/admin/AiPage.tsx +136 -32
- package/src/pages/admin/DataPage.tsx +2 -2
- package/src/pages/admin/{McpPage.tsx → McpPanel.tsx} +4 -6
- package/src/pages/admin/PrivacyPage.tsx +42 -0
- package/src/pages/forms/AddFieldMenu.tsx +2 -2
- package/src/pages/forms/EmbedPanel.tsx +5 -1
- package/src/pages/forms/FieldsEditor.tsx +204 -15
- package/src/pages/forms/FormSettings.tsx +156 -9
- package/src/pages/forms/SubmissionDetail.tsx +2 -1
- package/src/pages/forms/SubmissionsTable.tsx +2 -1
- package/src/pages/forms/fieldList.ts +39 -10
- package/src/pages/forms/template.ts +13 -0
- package/src/pages/handbook/HandbookPage.tsx +5 -5
- package/src/registry/context.ts +13 -0
- package/src/registry/contributions.ts +39 -1
- package/src/registry/registry.ts +30 -0
package/src/modules/aiRunner.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { AI_SERVICE_LABELS } from '@kelpie/schemas'
|
|
2
|
+
|
|
1
3
|
import { ApiError } from '../api/client.ts'
|
|
2
4
|
import { useAiRunForAgentRun, useAiSettings } from '../api/resources/ai.ts'
|
|
3
5
|
import { useAgents } from '../api/resources/agentTasks.ts'
|
|
@@ -25,20 +27,21 @@ function useAvailability(options: { readonly enabled: boolean }): AgentRunnerAva
|
|
|
25
27
|
if (settings.error !== null) {
|
|
26
28
|
// The runtime answers 403 or 404 when the module is switched off.
|
|
27
29
|
return settings.error instanceof ApiError && (settings.error.status === 403 || settings.error.status === 404)
|
|
28
|
-
? { status: 'unavailable', reason: '
|
|
29
|
-
: { status: 'unavailable', reason: '
|
|
30
|
+
? { status: 'unavailable', reason: 'AI is switched off for this workspace.' }
|
|
31
|
+
: { status: 'unavailable', reason: 'AI settings could not be read.' }
|
|
30
32
|
}
|
|
31
33
|
|
|
32
34
|
const record = settings.record
|
|
35
|
+
const label = record === undefined ? 'AI' : AI_SERVICE_LABELS[record.service]
|
|
33
36
|
|
|
34
37
|
if (record === undefined || !record.enabled) {
|
|
35
|
-
return { status: 'unavailable', reason:
|
|
38
|
+
return { status: 'unavailable', reason: `${label} is not enabled. An admin can enable it under Admin → AI.` }
|
|
36
39
|
}
|
|
37
40
|
|
|
38
41
|
if (!record.configured) {
|
|
39
42
|
return {
|
|
40
43
|
status: 'unavailable',
|
|
41
|
-
reason:
|
|
44
|
+
reason: `${label} has no provider key. An admin can add one under Admin → AI.`,
|
|
42
45
|
}
|
|
43
46
|
}
|
|
44
47
|
|
|
@@ -47,7 +50,7 @@ function useAvailability(options: { readonly enabled: boolean }): AgentRunnerAva
|
|
|
47
50
|
if (agent === undefined) {
|
|
48
51
|
return {
|
|
49
52
|
status: 'unavailable',
|
|
50
|
-
reason:
|
|
53
|
+
reason: `The ${label} agent is missing. An admin can save Admin → AI again to restore it.`,
|
|
51
54
|
}
|
|
52
55
|
}
|
|
53
56
|
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { personIntakeDependencies } from '@kelpie/schemas'
|
|
2
|
+
import type { PersonIntakeItem } from '@kelpie/schemas'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* The items that can be written given what is ticked: an item whose
|
|
6
|
+
* dependency is unticked, or cannot be written, drops out too.
|
|
7
|
+
*/
|
|
8
|
+
export function effectiveSelection(items: readonly PersonIntakeItem[], ticked: ReadonlySet<string>): ReadonlySet<string> {
|
|
9
|
+
const keys = new Set(items.map((item) => item.key))
|
|
10
|
+
const effective = new Set([...ticked].filter((key) => keys.has(key)))
|
|
11
|
+
let changed = true
|
|
12
|
+
|
|
13
|
+
while (changed) {
|
|
14
|
+
changed = false
|
|
15
|
+
for (const item of items) {
|
|
16
|
+
if (effective.has(item.key) && personIntakeDependencies(item).some((key) => !effective.has(key))) {
|
|
17
|
+
effective.delete(item.key)
|
|
18
|
+
changed = true
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return effective
|
|
24
|
+
}
|
package/src/pages/FormDetail.tsx
CHANGED
|
@@ -53,20 +53,24 @@ export function FormDetail(): React.JSX.Element {
|
|
|
53
53
|
← Forms
|
|
54
54
|
</Link>
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
{/* On a phone the controls go under the heading, so a long title keeps
|
|
57
|
+
the full width and does not break over several lines. */}
|
|
58
|
+
<div className="mb-6 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between">
|
|
57
59
|
<FormHeading form={record} />
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
60
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
61
|
+
<DeleteRecord
|
|
62
|
+
recordLabel="Form"
|
|
63
|
+
recordName={record.name}
|
|
64
|
+
isPending={deleteForm.isPending}
|
|
65
|
+
error={deleteForm.error}
|
|
66
|
+
onConfirm={() => {
|
|
67
|
+
deleteForm
|
|
68
|
+
.runAsync(record.id)
|
|
69
|
+
.then(() => navigate('/forms'))
|
|
70
|
+
.catch(() => undefined)
|
|
71
|
+
}}
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
70
74
|
</div>
|
|
71
75
|
|
|
72
76
|
<RecordTabs
|
|
@@ -118,7 +122,7 @@ function FormHeading({ form }: { readonly form: Form }): React.JSX.Element {
|
|
|
118
122
|
}
|
|
119
123
|
|
|
120
124
|
return (
|
|
121
|
-
<div className="min-w-
|
|
125
|
+
<div className="min-w-[12rem] flex-1">
|
|
122
126
|
<div className="flex flex-wrap items-center gap-2">
|
|
123
127
|
<div className="min-w-0 flex-1">
|
|
124
128
|
<InlineEdit
|
package/src/pages/FormsPage.tsx
CHANGED
|
@@ -136,11 +136,11 @@ export function FormsPage(): React.JSX.Element {
|
|
|
136
136
|
),
|
|
137
137
|
},
|
|
138
138
|
{
|
|
139
|
-
key: '
|
|
140
|
-
header: '
|
|
141
|
-
getSortValue: (form) => form.
|
|
139
|
+
key: 'slug',
|
|
140
|
+
header: 'Slug',
|
|
141
|
+
getSortValue: (form) => form.slug,
|
|
142
142
|
render: (form) => (
|
|
143
|
-
<span className="font-mono text-[12px] text-ink-muted">{form.
|
|
143
|
+
<span className="font-mono text-[12px] text-ink-muted">{form.slug}</span>
|
|
144
144
|
),
|
|
145
145
|
},
|
|
146
146
|
{
|
package/src/pages/ListDetail.tsx
CHANGED
|
@@ -65,9 +65,11 @@ export function ListDetail(): React.JSX.Element {
|
|
|
65
65
|
← Lists
|
|
66
66
|
</Link>
|
|
67
67
|
|
|
68
|
-
|
|
68
|
+
{/* On a phone the controls go under the heading, so a long title keeps
|
|
69
|
+
the full width and does not break over several lines. */}
|
|
70
|
+
<div className="mb-6 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between">
|
|
69
71
|
<ListHeading list={record} />
|
|
70
|
-
<div className="flex
|
|
72
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
71
73
|
<Chip>{RECORD_TARGET_TYPE_LABELS[record.targetType]}</Chip>
|
|
72
74
|
<DeleteRecord
|
|
73
75
|
recordLabel="List"
|
|
@@ -99,7 +101,7 @@ function ListHeading({ list }: { readonly list: List }): React.JSX.Element {
|
|
|
99
101
|
const { patch, error } = useListPatch(list)
|
|
100
102
|
|
|
101
103
|
return (
|
|
102
|
-
<div className="min-w-
|
|
104
|
+
<div className="min-w-[12rem] flex-1">
|
|
103
105
|
{error !== null && (
|
|
104
106
|
<div className="mb-2">
|
|
105
107
|
<ErrorPanel error={error} />
|
package/src/pages/PeoplePage.tsx
CHANGED
|
@@ -5,10 +5,13 @@ import { useNavigate } from 'react-router'
|
|
|
5
5
|
|
|
6
6
|
import { useTimezone } from '../api/resources/account.ts'
|
|
7
7
|
import { useCreatePerson, usePeople } from '../api/resources/people.ts'
|
|
8
|
+
import { useAiDrawer } from '../components/aiDrawerState.ts'
|
|
8
9
|
import { Chip } from '../components/Chip.tsx'
|
|
9
10
|
import { SocialNetworkIcon } from '../components/SocialNetworkIcon.tsx'
|
|
10
11
|
import { ColumnPicker } from '../components/ColumnPicker.tsx'
|
|
11
12
|
import { DataTable } from '../components/DataTable.tsx'
|
|
13
|
+
import { AddFromNotesButton } from '../components/PersonIntakePanel.tsx'
|
|
14
|
+
import { personIntakeTask } from '../components/personIntakeTask.tsx'
|
|
12
15
|
import type { Column } from '../components/DataTable.tsx'
|
|
13
16
|
import { FilterBar, PageHeader } from '../components/PageHeader.tsx'
|
|
14
17
|
import { Paginator } from '../components/Paginator.tsx'
|
|
@@ -59,6 +62,7 @@ export function PeoplePage(): React.JSX.Element {
|
|
|
59
62
|
})
|
|
60
63
|
const directory = usePeopleDirectory(people.records.map((person) => person.id))
|
|
61
64
|
const createPerson = useCreatePerson()
|
|
65
|
+
const aiDrawer = useAiDrawer()
|
|
62
66
|
|
|
63
67
|
async function addPerson(): Promise<void> {
|
|
64
68
|
// The same defaults the API applies, so a person created here and one
|
|
@@ -194,6 +198,8 @@ export function PeoplePage(): React.JSX.Element {
|
|
|
194
198
|
{
|
|
195
199
|
key: 'tags',
|
|
196
200
|
header: 'Tags',
|
|
201
|
+
// On a phone the tag chips wrap one per line and make every row tall.
|
|
202
|
+
className: 'hidden md:table-cell',
|
|
197
203
|
getSortValue: (person) => person.tags.join(', ') || null,
|
|
198
204
|
render: (person) =>
|
|
199
205
|
person.tags.length > 0 ? (
|
|
@@ -242,11 +248,18 @@ export function PeoplePage(): React.JSX.Element {
|
|
|
242
248
|
}}
|
|
243
249
|
addLabel="Add person"
|
|
244
250
|
actions={
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
251
|
+
<>
|
|
252
|
+
<ColumnPicker
|
|
253
|
+
options={pickerOptions}
|
|
254
|
+
visibleKeys={listView.visibleKeys}
|
|
255
|
+
onChange={listView.setVisibleKeys}
|
|
256
|
+
/>
|
|
257
|
+
<AddFromNotesButton
|
|
258
|
+
onClick={() => {
|
|
259
|
+
aiDrawer.open(personIntakeTask())
|
|
260
|
+
}}
|
|
261
|
+
/>
|
|
262
|
+
</>
|
|
250
263
|
}
|
|
251
264
|
/>
|
|
252
265
|
<FilterBar
|
package/src/pages/RoleDetail.tsx
CHANGED
|
@@ -71,9 +71,11 @@ export function RoleDetail(): React.JSX.Element {
|
|
|
71
71
|
← Hiring
|
|
72
72
|
</Link>
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
{/* On a phone the controls go under the heading, so a long role title
|
|
75
|
+
keeps the full width and does not break over several lines. */}
|
|
76
|
+
<div className="mb-6 flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between">
|
|
75
77
|
<RoleHeading role={record} />
|
|
76
|
-
<div className="flex
|
|
78
|
+
<div className="flex flex-wrap items-center gap-3">
|
|
77
79
|
<RoleStatusField role={record} />
|
|
78
80
|
<AgentTasks targetType="role" targetId={record.id} targetLabel={record.title} />
|
|
79
81
|
<DeleteRecord
|
|
@@ -109,7 +111,7 @@ function RoleHeading({ role }: { readonly role: Role }): React.JSX.Element {
|
|
|
109
111
|
const { patch, error } = useRolePatch(role)
|
|
110
112
|
|
|
111
113
|
return (
|
|
112
|
-
<div className="min-w-
|
|
114
|
+
<div className="min-w-[12rem] flex-1">
|
|
113
115
|
{error !== null && (
|
|
114
116
|
<div className="mb-2">
|
|
115
117
|
<ErrorPanel error={error} />
|
|
@@ -292,10 +294,13 @@ function CandidateRow({
|
|
|
292
294
|
|
|
293
295
|
return (
|
|
294
296
|
<li className="border-b border-border px-4 py-3.5 last:border-0">
|
|
295
|
-
|
|
297
|
+
{/* On a phone the controls always take their own line under the name.
|
|
298
|
+
Left to wrap, whether they fit beside it depends on the name length
|
|
299
|
+
and on the stage field, so rows in one list came out different. */}
|
|
300
|
+
<div className="flex flex-col gap-2 sm:flex-row sm:flex-wrap sm:items-start sm:justify-between sm:gap-3">
|
|
296
301
|
<Link
|
|
297
302
|
to={`/people/${candidate.personId}`}
|
|
298
|
-
className="text-left text-[13px] font-medium text-ink hover:text-accent"
|
|
303
|
+
className="self-start text-left text-[13px] font-medium text-ink hover:text-accent"
|
|
299
304
|
>
|
|
300
305
|
{personName ?? candidate.personId}
|
|
301
306
|
</Link>
|
|
@@ -34,7 +34,7 @@ export function ConnectedAppsPage(): React.JSX.Element {
|
|
|
34
34
|
No connected apps. When an MCP client asks you to sign in to Kelpie, it shows up here.
|
|
35
35
|
</p>
|
|
36
36
|
) : (
|
|
37
|
-
<div className="overflow-
|
|
37
|
+
<div className="overflow-x-auto rounded-md border border-border">
|
|
38
38
|
<table className="w-full text-left text-[13px]">
|
|
39
39
|
<thead>
|
|
40
40
|
<tr className="border-b border-border bg-surface text-[11px] font-semibold tracking-wide text-ink-muted uppercase">
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import type { ReactNode } from 'react'
|
|
2
|
+
import { useSearchParams } from 'react-router'
|
|
3
|
+
|
|
4
|
+
import { PageHeader } from '../../components/PageHeader.tsx'
|
|
5
|
+
import { RecordTabs } from '../../components/RecordTabs.tsx'
|
|
6
|
+
import { useAdminTabs } from '../../registry/context.ts'
|
|
7
|
+
import { inSlotOrder } from '../../registry/registry.ts'
|
|
8
|
+
import { McpPanel } from './McpPanel.tsx'
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Admin → AI at `/admin/ai`: how agents reach this workspace.
|
|
12
|
+
*
|
|
13
|
+
* Core owns the page and its MCP tab, so every install has both. The optional
|
|
14
|
+
* `ai` module adds Kelpie AI's Settings and Run log tabs through `adminTab`,
|
|
15
|
+
* ordered before MCP. Without that module the page is MCP alone.
|
|
16
|
+
*
|
|
17
|
+
* The open tab is `?tab=`, so a link can open one; `/admin/mcp` redirects to
|
|
18
|
+
* `?tab=mcp`. With no `tab`, or one no module provides, the first tab opens.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
interface PageTab {
|
|
22
|
+
readonly id: string
|
|
23
|
+
readonly label: string
|
|
24
|
+
readonly order?: number
|
|
25
|
+
readonly render: () => ReactNode
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const MCP_TAB: PageTab = { id: 'mcp', label: 'MCP', order: 300, render: () => <McpPanel /> }
|
|
29
|
+
|
|
30
|
+
export function AiAdminPage(): React.JSX.Element {
|
|
31
|
+
const moduleTabs = useAdminTabs('ai')
|
|
32
|
+
const tabs = inSlotOrder<PageTab>([...moduleTabs, MCP_TAB])
|
|
33
|
+
const [searchParams, setSearchParams] = useSearchParams()
|
|
34
|
+
const requested = searchParams.get('tab')
|
|
35
|
+
const active = tabs.find((tab) => tab.id === requested) ?? tabs[0] ?? MCP_TAB
|
|
36
|
+
|
|
37
|
+
return (
|
|
38
|
+
<div className="animate-slide-in mx-auto max-w-4xl space-y-6">
|
|
39
|
+
<PageHeader title="AI" description="Connect agents to this workspace, and run agent tasks." />
|
|
40
|
+
<RecordTabs
|
|
41
|
+
tabs={tabs.map((tab) => ({ id: tab.id, label: tab.label }))}
|
|
42
|
+
active={active.id}
|
|
43
|
+
onChange={(id) => {
|
|
44
|
+
setSearchParams({ tab: id }, { replace: true })
|
|
45
|
+
}}
|
|
46
|
+
ariaLabel="AI sections"
|
|
47
|
+
>
|
|
48
|
+
{active.render()}
|
|
49
|
+
</RecordTabs>
|
|
50
|
+
</div>
|
|
51
|
+
)
|
|
52
|
+
}
|
|
@@ -1,21 +1,25 @@
|
|
|
1
|
-
import { AI_DEFAULT_MODELS, AI_PROVIDER_LABELS, AI_PROVIDERS } from '@kelpie/schemas'
|
|
2
|
-
import type { AiProvider, AiRun, AiSettings, AiSettingsInput } from '@kelpie/schemas'
|
|
1
|
+
import { AI_DEFAULT_MODELS, AI_PROVIDER_LABELS, AI_PROVIDERS, AI_SERVICE_LABELS } from '@kelpie/schemas'
|
|
2
|
+
import type { AgentTaskTargetType, AiProvider, AiRun, AiSettings, AiSettingsInput } from '@kelpie/schemas'
|
|
3
3
|
import { useState } from 'react'
|
|
4
4
|
import type { FormEvent } from 'react'
|
|
5
|
+
import { Link } from 'react-router'
|
|
5
6
|
|
|
6
7
|
import { useTimezone } from '../../api/resources/account.ts'
|
|
7
|
-
import { useAiRuns, useAiSettings, useDisableAi, useSaveAiSettings } from '../../api/resources/ai.ts'
|
|
8
|
+
import { useAiRuns, useAiServiceLabel, useAiSettings, useDisableAi, useSaveAiSettings } from '../../api/resources/ai.ts'
|
|
8
9
|
import { Chip } from '../../components/Chip.tsx'
|
|
9
10
|
import type { ChipTone } from '../../components/Chip.tsx'
|
|
10
|
-
import {
|
|
11
|
+
import { LinkedText } from '../../components/LinkedText.tsx'
|
|
12
|
+
import { Paginator } from '../../components/Paginator.tsx'
|
|
11
13
|
import { ErrorPanel, LoadingPanel } from '../../components/QueryState.tsx'
|
|
12
14
|
import { formatRelativeTime } from '../../lib/dates.ts'
|
|
15
|
+
import { targetHref } from '../../lib/recordLinks.ts'
|
|
13
16
|
|
|
14
17
|
/**
|
|
15
|
-
* The
|
|
18
|
+
* The optional `ai` module's two tabs on Admin → AI, the core page at
|
|
19
|
+
* `/admin/ai` (`AiAdminPage`), beside core's MCP tab.
|
|
16
20
|
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
21
|
+
* Settings for Kelpie AI in this workspace, and its run log. Both read the
|
|
22
|
+
* same `/v1/ai/*` endpoints an agent would use.
|
|
19
23
|
*
|
|
20
24
|
* What the settings part shows depends on the module's key mode. In
|
|
21
25
|
* `workspace` mode an admin picks a provider, pastes their own API key, and
|
|
@@ -37,6 +41,21 @@ const OPERATION_TONES: Readonly<Record<string, ChipTone>> = {
|
|
|
37
41
|
skipped: 'neutral',
|
|
38
42
|
}
|
|
39
43
|
|
|
44
|
+
/** A `workspace` target is not shown: every run is in this workspace. */
|
|
45
|
+
const TARGET_TYPE_LABELS: Readonly<Record<Exclude<AgentTaskTargetType, 'workspace'>, string>> = {
|
|
46
|
+
person: 'Person',
|
|
47
|
+
company: 'Company',
|
|
48
|
+
deal: 'Deal',
|
|
49
|
+
opportunity: 'Opportunity',
|
|
50
|
+
partnership: 'Partnership',
|
|
51
|
+
raise: 'Raise',
|
|
52
|
+
enquiry: 'Enquiry',
|
|
53
|
+
event: 'Event',
|
|
54
|
+
candidate: 'Candidate',
|
|
55
|
+
role: 'Role',
|
|
56
|
+
handbook: 'Handbook page',
|
|
57
|
+
}
|
|
58
|
+
|
|
40
59
|
const inputClass =
|
|
41
60
|
'w-full max-w-md rounded-md border border-border bg-surface px-3 py-2 text-[13px] outline-none focus:border-accent focus:ring-2 focus:ring-accent/20'
|
|
42
61
|
const primaryButtonClass =
|
|
@@ -218,22 +237,64 @@ function DeploymentKeyControls({ settings }: { readonly settings: AiSettings }):
|
|
|
218
237
|
)
|
|
219
238
|
}
|
|
220
239
|
|
|
240
|
+
/**
|
|
241
|
+
* Whether Add from notes may search the web. Saves on change: it is one
|
|
242
|
+
* switch, and the provider and key are untouched, so either key mode sends it.
|
|
243
|
+
*/
|
|
244
|
+
function WebSearchToggle({ settings }: { readonly settings: AiSettings }): React.JSX.Element {
|
|
245
|
+
const save = useSaveAiSettings()
|
|
246
|
+
|
|
247
|
+
return (
|
|
248
|
+
<div className="mt-4 space-y-2 border-t border-border pt-4">
|
|
249
|
+
<label className="flex items-start gap-2 text-[13px] text-ink">
|
|
250
|
+
<input
|
|
251
|
+
type="checkbox"
|
|
252
|
+
className="mt-0.5"
|
|
253
|
+
checked={settings.webSearch}
|
|
254
|
+
disabled={save.isPending}
|
|
255
|
+
onChange={(event) => {
|
|
256
|
+
save.run({ webSearch: event.target.checked })
|
|
257
|
+
}}
|
|
258
|
+
/>
|
|
259
|
+
<span>
|
|
260
|
+
<span className="font-medium">Web search</span>
|
|
261
|
+
<span className="block text-[12px] text-ink-muted">
|
|
262
|
+
Add from notes on People may use the provider's web search to research a person. Agent-task runs never
|
|
263
|
+
search. Turn this off to work from pasted notes and the CRM only.
|
|
264
|
+
</span>
|
|
265
|
+
</span>
|
|
266
|
+
</label>
|
|
267
|
+
{save.error !== null && <ErrorPanel error={save.error} />}
|
|
268
|
+
</div>
|
|
269
|
+
)
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Kelpie AI is a hosted service: its provider and model are its own, so the
|
|
274
|
+
* panel names the service and leaves them out. A custom provider is the
|
|
275
|
+
* workspace's own, so the panel shows which one and which model.
|
|
276
|
+
*/
|
|
221
277
|
function SettingsPanel({ settings }: { readonly settings: AiSettings }): React.JSX.Element {
|
|
222
278
|
const disable = useDisableAi()
|
|
279
|
+
const label = AI_SERVICE_LABELS[settings.service]
|
|
280
|
+
const isHosted = settings.service === 'kelpie_ai'
|
|
223
281
|
|
|
224
282
|
return (
|
|
225
283
|
<section className="rounded-md border border-border p-5">
|
|
226
284
|
<div className="flex flex-wrap items-center gap-2">
|
|
227
|
-
<h2 className="text-[15px] font-semibold text-ink">
|
|
285
|
+
<h2 className="text-[15px] font-semibold text-ink">{label}</h2>
|
|
228
286
|
<Chip tone={settings.enabled ? 'success' : 'neutral'}>{settings.enabled ? 'Enabled' : 'Not enabled'}</Chip>
|
|
229
287
|
</div>
|
|
230
288
|
<p className="mt-2 max-w-2xl text-[13px] leading-relaxed text-ink-muted">
|
|
231
|
-
|
|
232
|
-
|
|
289
|
+
{isHosted
|
|
290
|
+
? 'Kelpie AI runs agent tasks for you: enrichment, summaries, follow-ups and notes.'
|
|
291
|
+
: 'Run agent tasks on your own OpenAI or Anthropic key: enrichment, summaries, follow-ups and notes.'}{' '}
|
|
292
|
+
Kelpie reads the record and its neighbours, asks the model for a reply, and applies that reply through the
|
|
293
|
+
same tools any agent uses.
|
|
233
294
|
</p>
|
|
234
295
|
|
|
235
296
|
<dl className="mt-4 grid max-w-md grid-cols-2 gap-y-2 text-[13px]">
|
|
236
|
-
{settings.provider !== null && (
|
|
297
|
+
{!isHosted && settings.provider !== null && (
|
|
237
298
|
<>
|
|
238
299
|
<dt className="text-ink-muted">Provider</dt>
|
|
239
300
|
<dd className="text-ink">{AI_PROVIDER_LABELS[settings.provider]}</dd>
|
|
@@ -258,6 +319,8 @@ function SettingsPanel({ settings }: { readonly settings: AiSettings }): React.J
|
|
|
258
319
|
<DeploymentKeyControls settings={settings} />
|
|
259
320
|
)}
|
|
260
321
|
|
|
322
|
+
{settings.enabled && settings.configured && <WebSearchToggle settings={settings} />}
|
|
323
|
+
|
|
261
324
|
{settings.enabled && (
|
|
262
325
|
<div className="mt-4 space-y-2 border-t border-border pt-4">
|
|
263
326
|
{disable.error !== null && <ErrorPanel error={disable.error} />}
|
|
@@ -272,7 +335,7 @@ function SettingsPanel({ settings }: { readonly settings: AiSettings }): React.J
|
|
|
272
335
|
{disable.isPending ? 'Disabling…' : 'Disable AI'}
|
|
273
336
|
</button>
|
|
274
337
|
<p className="text-[12px] text-ink-muted">
|
|
275
|
-
Disabling removes
|
|
338
|
+
Disabling removes {label} from the Run menu
|
|
276
339
|
{settings.keySource === 'workspace' ? ' and deletes the stored key' : ''}. The run log is kept.
|
|
277
340
|
</p>
|
|
278
341
|
</div>
|
|
@@ -281,8 +344,50 @@ function SettingsPanel({ settings }: { readonly settings: AiSettings }): React.J
|
|
|
281
344
|
)
|
|
282
345
|
}
|
|
283
346
|
|
|
347
|
+
/** `22012 in · 1576 out`, or null when the run recorded no token counts. */
|
|
348
|
+
function tokens(run: AiRun): string | null {
|
|
349
|
+
return run.inputTokens === null || run.outputTokens === null
|
|
350
|
+
? null
|
|
351
|
+
: `${String(run.inputTokens)} in · ${String(run.outputTokens)} out`
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
/**
|
|
355
|
+
* `Company · Acme`, with the name linked to the record's page, as an Activity
|
|
356
|
+
* row names its record. Nothing for a `workspace` target. The type alone when
|
|
357
|
+
* the record has no name, because it has since been deleted.
|
|
358
|
+
*/
|
|
359
|
+
function RunTarget({ run }: { readonly run: AiRun }): React.JSX.Element | null {
|
|
360
|
+
if (run.targetType === 'workspace') {
|
|
361
|
+
return null
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
const href = targetHref(run.targetType === 'handbook' ? 'handbook_page' : run.targetType, run.targetId)
|
|
365
|
+
|
|
366
|
+
return (
|
|
367
|
+
<span className="text-[12px] text-ink-muted">
|
|
368
|
+
{TARGET_TYPE_LABELS[run.targetType]}
|
|
369
|
+
{run.targetName !== null && (
|
|
370
|
+
<>
|
|
371
|
+
{' · '}
|
|
372
|
+
{href === undefined ? (
|
|
373
|
+
run.targetName
|
|
374
|
+
) : (
|
|
375
|
+
<Link to={href} title={run.targetId} className="hover:text-accent hover:underline">
|
|
376
|
+
{run.targetName}
|
|
377
|
+
</Link>
|
|
378
|
+
)}
|
|
379
|
+
</>
|
|
380
|
+
)}
|
|
381
|
+
</span>
|
|
382
|
+
)
|
|
383
|
+
}
|
|
384
|
+
|
|
284
385
|
function RunLog(): React.JSX.Element {
|
|
285
|
-
const
|
|
386
|
+
const list = useAiRuns()
|
|
387
|
+
const serviceLabel = useAiServiceLabel()
|
|
388
|
+
// Kelpie AI's model is the hosted service's own, as on the Settings tab.
|
|
389
|
+
const showModel = useAiSettings().record?.service !== 'kelpie_ai'
|
|
390
|
+
const { records: runs, isLoading, error } = list
|
|
286
391
|
const timezone = useTimezone()
|
|
287
392
|
|
|
288
393
|
return (
|
|
@@ -292,7 +397,7 @@ function RunLog(): React.JSX.Element {
|
|
|
292
397
|
{error !== null && <ErrorPanel error={error} />}
|
|
293
398
|
{!isLoading && error === null && runs.length === 0 && (
|
|
294
399
|
<p className="mt-2 text-[13px] text-ink-muted">
|
|
295
|
-
No runs yet. Start one from the Agent menu on any record page and pick <em>
|
|
400
|
+
No runs yet. Start one from the Agent menu on any record page and pick <em>{serviceLabel}</em>.
|
|
296
401
|
</p>
|
|
297
402
|
)}
|
|
298
403
|
{runs.length > 0 && (
|
|
@@ -302,30 +407,24 @@ function RunLog(): React.JSX.Element {
|
|
|
302
407
|
<div className="flex flex-wrap items-center gap-2">
|
|
303
408
|
<Chip tone={STATUS_TONES[run.status]}>{run.status}</Chip>
|
|
304
409
|
<span className="text-[13px] font-medium text-ink">{run.taskId}</span>
|
|
305
|
-
<
|
|
306
|
-
{run.targetType} · {run.targetId}
|
|
307
|
-
</span>
|
|
410
|
+
<RunTarget run={run} />
|
|
308
411
|
<span className="ml-auto text-[12px] text-ink-faint">{formatRelativeTime(run.createdAt, timezone)}</span>
|
|
309
412
|
</div>
|
|
310
413
|
<p className="mt-1 text-[12px] text-ink-muted">
|
|
311
|
-
<span className="font-mono">{run.model}</span>
|
|
312
|
-
{run
|
|
313
|
-
|
|
314
|
-
: ''}
|
|
414
|
+
{showModel && <span className="font-mono">{run.model}</span>}
|
|
415
|
+
{showModel && tokens(run) !== null && ' · '}
|
|
416
|
+
{tokens(run)}
|
|
315
417
|
</p>
|
|
316
418
|
{run.failureReason !== null && <p className="mt-2 text-[12px] text-danger">{run.failureReason}</p>}
|
|
317
|
-
{run.output !== null && (
|
|
318
|
-
<pre className="mt-2 max-h-64 overflow-auto whitespace-pre-wrap rounded bg-surface-raised p-2 text-[12px] text-ink">
|
|
319
|
-
{run.output}
|
|
320
|
-
</pre>
|
|
321
|
-
)}
|
|
322
419
|
{run.operations !== null && run.operations.length > 0 && (
|
|
323
420
|
<ul className="mt-2 flex flex-col gap-1">
|
|
324
421
|
{run.operations.map((operation, index) => (
|
|
325
422
|
<li key={`${run.id}-op-${String(index)}`} className="flex flex-wrap items-center gap-2 text-[12px]">
|
|
326
423
|
<Chip tone={OPERATION_TONES[operation.status] ?? 'neutral'}>{operation.status}</Chip>
|
|
327
424
|
<span className="font-medium text-ink">{operation.kind}</span>
|
|
328
|
-
<span className="text-ink-muted">
|
|
425
|
+
<span className="text-ink-muted">
|
|
426
|
+
<LinkedText text={operation.detail} references={operation.references} />
|
|
427
|
+
</span>
|
|
329
428
|
</li>
|
|
330
429
|
))}
|
|
331
430
|
</ul>
|
|
@@ -334,20 +433,25 @@ function RunLog(): React.JSX.Element {
|
|
|
334
433
|
))}
|
|
335
434
|
</ul>
|
|
336
435
|
)}
|
|
436
|
+
{runs.length > 0 && <Paginator list={list} />}
|
|
337
437
|
</section>
|
|
338
438
|
)
|
|
339
439
|
}
|
|
340
440
|
|
|
341
|
-
|
|
441
|
+
/** The Settings tab the `ai` module adds to Admin → AI. */
|
|
442
|
+
export function AiSettingsTab(): React.JSX.Element {
|
|
342
443
|
const { record: settings, isLoading, error } = useAiSettings()
|
|
343
444
|
|
|
344
445
|
return (
|
|
345
|
-
|
|
346
|
-
<PageHeader title="AI" description="Run agent tasks with your own model provider." />
|
|
446
|
+
<>
|
|
347
447
|
{isLoading && <LoadingPanel label="Loading AI settings…" />}
|
|
348
448
|
{error !== null && <ErrorPanel error={error} />}
|
|
349
449
|
{settings !== undefined && <SettingsPanel settings={settings} />}
|
|
350
|
-
|
|
351
|
-
</div>
|
|
450
|
+
</>
|
|
352
451
|
)
|
|
353
452
|
}
|
|
453
|
+
|
|
454
|
+
/** The Run log tab the `ai` module adds to Admin → AI. */
|
|
455
|
+
export function AiRunLogTab(): React.JSX.Element {
|
|
456
|
+
return <RunLog />
|
|
457
|
+
}
|
|
@@ -571,7 +571,7 @@ function MappingForm(props: MappingFormProps): ReactNode {
|
|
|
571
571
|
: 'A company that is not here yet is left unlinked and reported as a warning.'}
|
|
572
572
|
</p>
|
|
573
573
|
) : null}
|
|
574
|
-
<div className="overflow-
|
|
574
|
+
<div className="overflow-x-auto rounded-md border border-border">
|
|
575
575
|
<table className="w-full text-left text-[13px]">
|
|
576
576
|
<thead>
|
|
577
577
|
<tr className="border-b border-border bg-surface text-[11px] font-semibold tracking-wide text-ink-muted uppercase">
|
|
@@ -810,7 +810,7 @@ function DonePanel({ job, object, onAgain }: DonePanelProps): ReactNode {
|
|
|
810
810
|
/** The row / field / message table shared by the error and warning lists. */
|
|
811
811
|
function IssueTable({ rows }: { readonly rows: readonly ImportRowError[] }): ReactNode {
|
|
812
812
|
return (
|
|
813
|
-
<div className="overflow-
|
|
813
|
+
<div className="overflow-x-auto rounded-md border border-border">
|
|
814
814
|
<table className="w-full text-left text-[13px]">
|
|
815
815
|
<thead>
|
|
816
816
|
<tr className="border-b border-border bg-surface text-[11px] font-semibold tracking-wide text-ink-muted uppercase">
|
|
@@ -12,14 +12,13 @@ import {
|
|
|
12
12
|
useDeleteAgent,
|
|
13
13
|
} from '../../api/resources/agentTasks.ts'
|
|
14
14
|
import { useMcpTools } from '../../api/resources/mcpTools.ts'
|
|
15
|
-
import { PageHeader } from '../../components/PageHeader.tsx'
|
|
16
15
|
import { ErrorPanel, LoadingPanel } from '../../components/QueryState.tsx'
|
|
17
16
|
import { CopyButton } from '../../components/CopyButton.tsx'
|
|
18
17
|
import { formatRelativeTime } from '../../lib/dates.ts'
|
|
19
18
|
import { mcpClientConfig, mcpEndpoint } from '../../lib/mcpConfig.ts'
|
|
20
19
|
|
|
21
20
|
/**
|
|
22
|
-
* How an agent connects to this workspace.
|
|
21
|
+
* How an agent connects to this workspace: the MCP tab on Admin → AI.
|
|
23
22
|
*
|
|
24
23
|
* Everything on the page is derived rather than written down. The endpoint comes
|
|
25
24
|
* from the origin the browser reached the app on, the same way a form's embed URL
|
|
@@ -50,14 +49,13 @@ function matches(tool: McpTool, term: string): boolean {
|
|
|
50
49
|
)
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
|
|
52
|
+
/** The MCP tab on Admin → AI. Core, so every install has it. */
|
|
53
|
+
export function McpPanel(): React.JSX.Element {
|
|
54
54
|
const endpoint = mcpEndpoint()
|
|
55
55
|
const config = mcpClientConfig(endpoint, 'kp_live_…')
|
|
56
56
|
|
|
57
57
|
return (
|
|
58
|
-
<div className="
|
|
59
|
-
<PageHeader title="MCP" description="Connect agents to this workspace over Streamable HTTP." />
|
|
60
|
-
|
|
58
|
+
<div className="space-y-6">
|
|
61
59
|
<section className="rounded-md border border-border p-5">
|
|
62
60
|
<h2 className="text-[15px] font-semibold text-ink">How agents use Kelpie</h2>
|
|
63
61
|
<p className="mt-2 max-w-2xl text-[13px] leading-relaxed text-ink-muted">
|