@budibase/frontend-core 3.44.0 → 3.44.1
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@budibase/frontend-core",
|
|
3
|
-
"version": "v3.44.
|
|
3
|
+
"version": "v3.44.1",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -11,11 +11,11 @@
|
|
|
11
11
|
"test:watch": "vitest"
|
|
12
12
|
},
|
|
13
13
|
"dependencies": {
|
|
14
|
-
"@ai-sdk/svelte": "^
|
|
14
|
+
"@ai-sdk/svelte": "^5.0.77",
|
|
15
15
|
"@budibase/bbui": "*",
|
|
16
16
|
"@budibase/shared-core": "*",
|
|
17
17
|
"@budibase/types": "*",
|
|
18
|
-
"ai": "^
|
|
18
|
+
"ai": "^7.0.77",
|
|
19
19
|
"dayjs": "^1.10.8",
|
|
20
20
|
"lodash": "4.18.1",
|
|
21
21
|
"socket.io-client": "^4.7.5"
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"vitest": "^4.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "1709761edbab48686390d5d2336283e31b0d1dce"
|
|
27
27
|
}
|
package/src/api/workspaceHome.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GetGitHubStarsResponse,
|
|
3
|
-
|
|
3
|
+
GetTenantMetricsResponse,
|
|
4
4
|
} from "@budibase/types"
|
|
5
5
|
import { BaseAPIClient } from "./types"
|
|
6
6
|
|
|
7
7
|
export interface WorkspaceHomeEndpoints {
|
|
8
|
-
getMetrics: () => Promise<
|
|
8
|
+
getMetrics: () => Promise<GetTenantMetricsResponse>
|
|
9
9
|
getGitHubStars: () => Promise<GetGitHubStarsResponse>
|
|
10
10
|
}
|
|
11
11
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
EscalationContextDoc,
|
|
15
15
|
EscalationRespondResult,
|
|
16
16
|
} from "@budibase/types"
|
|
17
|
-
import {
|
|
17
|
+
import { EscalateToolResultStatus } from "@budibase/types"
|
|
18
18
|
import { Header } from "@budibase/shared-core"
|
|
19
19
|
import { tick, untrack } from "svelte"
|
|
20
20
|
import { createAPIClient } from "@budibase/frontend-core"
|
|
@@ -92,13 +92,15 @@
|
|
|
92
92
|
// The escalate part's input/output are loosely typed by the AI SDK, so the
|
|
93
93
|
// casts live here rather than cluttering the template.
|
|
94
94
|
const escalationCardProps = (part: { input?: unknown; output?: unknown }) => {
|
|
95
|
-
const output = part.output as
|
|
95
|
+
const output = part.output as
|
|
96
|
+
| { escalationId?: string; title?: string; summary?: string }
|
|
97
|
+
| undefined
|
|
96
98
|
const input = part.input as { title?: string; summary?: string } | undefined
|
|
97
99
|
const escalationId = output?.escalationId
|
|
98
100
|
return {
|
|
99
101
|
escalationId,
|
|
100
|
-
title: input?.title,
|
|
101
|
-
summary: input?.summary,
|
|
102
|
+
title: output?.title ?? input?.title,
|
|
103
|
+
summary: output?.summary ?? input?.summary,
|
|
102
104
|
resolution:
|
|
103
105
|
(escalationId && escalationState?.[escalationId]?.resolution) ||
|
|
104
106
|
"pending",
|
|
@@ -317,11 +319,7 @@
|
|
|
317
319
|
const ids: string[] = []
|
|
318
320
|
for (const message of messages) {
|
|
319
321
|
for (const part of message.parts ?? []) {
|
|
320
|
-
if (
|
|
321
|
-
!isToolUIPart(part) ||
|
|
322
|
-
getToolName(part) !== ESCALATE_TOOL_NAME ||
|
|
323
|
-
part.state !== "output-available"
|
|
324
|
-
) {
|
|
322
|
+
if (!isToolUIPart(part) || part.state !== "output-available") {
|
|
325
323
|
continue
|
|
326
324
|
}
|
|
327
325
|
const output = part.output as
|
|
@@ -609,7 +607,7 @@
|
|
|
609
607
|
{#each message.parts ?? [] as part, partIndex}
|
|
610
608
|
{#if isTextUIPart(part)}
|
|
611
609
|
<MarkdownViewer value={part.text} />
|
|
612
|
-
{:else if isToolUIPart(part) &&
|
|
610
|
+
{:else if isToolUIPart(part) && isRaisedEscalation(part.output)}
|
|
613
611
|
{@const card = escalationCardProps(part)}
|
|
614
612
|
<EscalationCard
|
|
615
613
|
title={card.title}
|