@budibase/frontend-core 3.39.29 → 3.39.31
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": "3.39.
|
|
3
|
+
"version": "3.39.31",
|
|
4
4
|
"description": "Budibase frontend core libraries used in builder and client",
|
|
5
5
|
"author": "Budibase",
|
|
6
6
|
"license": "MPL-2.0",
|
|
@@ -23,5 +23,5 @@
|
|
|
23
23
|
"devDependencies": {
|
|
24
24
|
"vitest": "^4.1.0"
|
|
25
25
|
},
|
|
26
|
-
"gitHead": "
|
|
26
|
+
"gitHead": "11952e46cb13544c703a56d89e8bef8c189fd989"
|
|
27
27
|
}
|
package/src/api/agentRequests.ts
CHANGED
|
@@ -1,10 +1,14 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type {
|
|
2
|
+
AgentRequestStatus,
|
|
3
|
+
FetchAgentRequestsResponse,
|
|
4
|
+
} from "@budibase/types"
|
|
2
5
|
import type { BaseAPIClient } from "./types"
|
|
3
6
|
|
|
4
7
|
export interface AgentRequestEndpoints {
|
|
5
8
|
fetchAgentRequests: (opts?: {
|
|
6
9
|
limit?: number
|
|
7
10
|
page?: number
|
|
11
|
+
status?: AgentRequestStatus
|
|
8
12
|
}) => Promise<FetchAgentRequestsResponse>
|
|
9
13
|
}
|
|
10
14
|
|
|
@@ -19,6 +23,9 @@ export const buildAgentRequestEndpoints = (
|
|
|
19
23
|
if (opts.page !== undefined) {
|
|
20
24
|
params.set("page", String(opts.page))
|
|
21
25
|
}
|
|
26
|
+
if (opts.status !== undefined) {
|
|
27
|
+
params.set("status", opts.status)
|
|
28
|
+
}
|
|
22
29
|
|
|
23
30
|
const query = params.toString()
|
|
24
31
|
return await API.get({
|
|
@@ -14,11 +14,12 @@
|
|
|
14
14
|
EscalationContextDoc,
|
|
15
15
|
EscalationRespondResult,
|
|
16
16
|
} from "@budibase/types"
|
|
17
|
+
import { ESCALATE_TOOL_NAME, EscalateToolResultStatus } from "@budibase/types"
|
|
17
18
|
import { Header } from "@budibase/shared-core"
|
|
18
19
|
import { tick, untrack } from "svelte"
|
|
19
20
|
import { createAPIClient } from "@budibase/frontend-core"
|
|
20
21
|
import { Chat } from "@ai-sdk/svelte"
|
|
21
|
-
import { formatToolName } from "../../utils
|
|
22
|
+
import { formatToolName } from "../../utils"
|
|
22
23
|
import ReasoningStatus from "./ReasoningStatus.svelte"
|
|
23
24
|
import ContextUsage from "./ContextUsage.svelte"
|
|
24
25
|
import EscalationCard from "./EscalationCard.svelte"
|
|
@@ -385,7 +386,7 @@
|
|
|
385
386
|
for (const part of message.parts ?? []) {
|
|
386
387
|
if (
|
|
387
388
|
!isToolUIPart(part) ||
|
|
388
|
-
getToolName(part) !==
|
|
389
|
+
getToolName(part) !== ESCALATE_TOOL_NAME ||
|
|
389
390
|
part.state !== "output-available"
|
|
390
391
|
) {
|
|
391
392
|
continue
|
|
@@ -393,7 +394,10 @@
|
|
|
393
394
|
const output = part.output as
|
|
394
395
|
| { status?: string; escalationId?: string }
|
|
395
396
|
| undefined
|
|
396
|
-
if (
|
|
397
|
+
if (
|
|
398
|
+
output?.status === EscalateToolResultStatus.PENDING_APPROVAL &&
|
|
399
|
+
output.escalationId
|
|
400
|
+
) {
|
|
397
401
|
ids.push(output.escalationId)
|
|
398
402
|
}
|
|
399
403
|
}
|
|
@@ -773,7 +777,7 @@
|
|
|
773
777
|
{#each message.parts ?? [] as part, partIndex}
|
|
774
778
|
{#if isTextUIPart(part)}
|
|
775
779
|
<MarkdownViewer value={part.text} />
|
|
776
|
-
{:else if isToolUIPart(part) && getToolName(part) ===
|
|
780
|
+
{:else if isToolUIPart(part) && getToolName(part) === ESCALATE_TOOL_NAME}
|
|
777
781
|
{@const card = escalationCardProps(part)}
|
|
778
782
|
<EscalationCard
|
|
779
783
|
title={card.title}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import {
|
|
3
|
+
AbsTooltip,
|
|
3
4
|
Body,
|
|
4
5
|
Button,
|
|
5
6
|
Icon,
|
|
@@ -44,6 +45,7 @@
|
|
|
44
45
|
export let drawerTitle = null
|
|
45
46
|
export let bindingValueType = Constants.FilterValueType.BINDING
|
|
46
47
|
export let useConditionValueControls = false
|
|
48
|
+
export let flagInvalidFields = false
|
|
47
49
|
|
|
48
50
|
export let bindings
|
|
49
51
|
export let panel
|
|
@@ -103,6 +105,41 @@
|
|
|
103
105
|
value: field.name,
|
|
104
106
|
}))
|
|
105
107
|
|
|
108
|
+
const INVALID_FIELD_TOOLTIP =
|
|
109
|
+
"This field may have been deleted or renamed. No rows will be returned until it is updated or removed"
|
|
110
|
+
|
|
111
|
+
const isInvalidField = (filter, options) => {
|
|
112
|
+
return (
|
|
113
|
+
flagInvalidFields &&
|
|
114
|
+
!!filter.field &&
|
|
115
|
+
!options.some(option => option.value === filter.field)
|
|
116
|
+
)
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// A saved filter can reference a column that no longer exists. When enabled,
|
|
120
|
+
// keep the referenced field visible as a flagged option rather than an
|
|
121
|
+
// unset column select, so it can be seen and resolved.
|
|
122
|
+
const getFieldOptions = (filter, options) => {
|
|
123
|
+
if (isInvalidField(filter, options)) {
|
|
124
|
+
return [
|
|
125
|
+
{
|
|
126
|
+
label: filter.field,
|
|
127
|
+
value: filter.field,
|
|
128
|
+
icon: {
|
|
129
|
+
component: Icon,
|
|
130
|
+
props: {
|
|
131
|
+
name: "warning",
|
|
132
|
+
size: "M",
|
|
133
|
+
color: "var(--spectrum-global-color-yellow-600)",
|
|
134
|
+
},
|
|
135
|
+
},
|
|
136
|
+
},
|
|
137
|
+
...options,
|
|
138
|
+
]
|
|
139
|
+
}
|
|
140
|
+
return options
|
|
141
|
+
}
|
|
142
|
+
|
|
106
143
|
const onFieldChange = filter => {
|
|
107
144
|
const previousType = filter.type
|
|
108
145
|
sanitizeTypes(filter)
|
|
@@ -376,17 +413,23 @@
|
|
|
376
413
|
{sanitizeValue}
|
|
377
414
|
/>
|
|
378
415
|
{:else}
|
|
379
|
-
<
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
416
|
+
<AbsTooltip
|
|
417
|
+
text={isInvalidField(filter, fieldOptions)
|
|
418
|
+
? INVALID_FIELD_TOOLTIP
|
|
419
|
+
: ""}
|
|
420
|
+
>
|
|
421
|
+
<Select
|
|
422
|
+
value={filter.field}
|
|
423
|
+
options={getFieldOptions(filter, fieldOptions)}
|
|
424
|
+
on:change={e => {
|
|
425
|
+
const updated = { ...filter, field: e.detail }
|
|
426
|
+
onFieldChange(updated)
|
|
427
|
+
onFilterFieldUpdate(updated, groupIdx, filterIdx)
|
|
428
|
+
}}
|
|
429
|
+
placeholder="Column"
|
|
430
|
+
popoverAutoWidth
|
|
431
|
+
/>
|
|
432
|
+
</AbsTooltip>
|
|
390
433
|
{/if}
|
|
391
434
|
<Select
|
|
392
435
|
value={filter.operator || OperatorOptions.Equals.value}
|