react-semaphor 0.1.578 → 0.1.579
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/assistant-context/index.js +1 -1
- package/dist/assistant-protocol/index.js +69 -66
- package/dist/briefings/index.js +1 -1
- package/dist/chunks/{add-to-dashboard-B6Ah8Lub.js → add-to-dashboard-DQFuDA5R.js} +50 -46
- package/dist/chunks/{assistant-chat-B_tmsxEK.js → assistant-chat-DBuKmREJ.js} +421 -421
- package/dist/chunks/{bookmark-impact-DUWw3wlA.js → bookmark-impact-MH4Dr-Ya.js} +1 -1
- package/dist/chunks/{card-filter-builder-CwnMUZU2.js → card-filter-builder-B9vtXVIZ.js} +3 -3
- package/dist/chunks/{context-R31TSL5V.js → context-BTLBjQNh.js} +99 -83
- package/dist/chunks/{dashboard-BcIIBCTP.js → dashboard-C4fyqxvV.js} +1 -1
- package/dist/chunks/{dashboard-briefing-launcher-BBpECqg2.js → dashboard-briefing-launcher-A9CLFv0s.js} +7 -7
- package/dist/chunks/{dashboard-controls-CONzvjmO.js → dashboard-controls-oKDW-835.js} +7 -7
- package/dist/chunks/{dashboard-json-BF2chEVd.js → dashboard-json-Bej2NBkS.js} +1 -1
- package/dist/chunks/{dates-DlYMDaF2.js → dates-BhL-mimk.js} +5 -5
- package/dist/chunks/{edit-dashboard-visual-Bf-RcbuD.js → edit-dashboard-visual-BFsCY2GP.js} +8 -8
- package/dist/chunks/{filter-reach-copy-BTAXnbwQ.js → filter-reach-copy-Xus3MfSo.js} +3 -3
- package/dist/chunks/{index-8BxDk8EP.js → index-CwlaI-UP.js} +2 -2
- package/dist/chunks/{report-preferences-dialog-RN4g9PEN.js → report-preferences-dialog-CcekIvkV.js} +7 -7
- package/dist/chunks/{resolve-dashboard-input-context-DBFuNhZo.js → resolve-dashboard-input-context-DoZHMivF.js} +1 -1
- package/dist/chunks/{saved-dashboard-context-AChHk4tw.js → saved-dashboard-context-LiDPCJ3r.js} +3 -3
- package/dist/chunks/{semaphor-ready-indicator-DtivanBy.js → semaphor-ready-indicator-cAOfbBuc.js} +5 -5
- package/dist/chunks/{shelf-drop-preview-context-BTjYxbHC.js → shelf-drop-preview-context-CwoYR7v1.js} +2 -2
- package/dist/chunks/{stored-dashboard-rpLzf4mk.js → stored-dashboard-CjnPEWO-.js} +2 -2
- package/dist/chunks/{variable-draft-DPSMDwqt.js → variable-draft-T4EOBvcu.js} +2 -2
- package/dist/dashboard/index.js +1 -1
- package/dist/dashboard-authoring/index.js +10 -10
- package/dist/index.js +12 -12
- package/dist/surfboard/index.js +1 -1
- package/dist/types/shared/assistant-protocol/answer-text.d.ts +5 -1
- package/dist/types/shared/assistant-protocol/context.d.ts +2 -1
- package/dist/types/shared/assistant-protocol/parts.d.ts +2 -1
- package/dist/types/shared/usage-events/catalog.d.ts +5 -3
- package/dist/types/shared/usage-events/details.d.ts +66 -0
- package/dist/types/shared/usage-events/envelope.d.ts +5 -5
- package/dist/usage-events/index.js +154 -115
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as e, a as t, b as r, c as d, d as o, p as i, e as n, f as p } from "../chunks/saved-dashboard-context-
|
|
1
|
+
import { A as e, a as t, b as r, c as d, d as o, p as i, e as n, f as p } from "../chunks/saved-dashboard-context-LiDPCJ3r.js";
|
|
2
2
|
export {
|
|
3
3
|
e as AssistantContextSourceError,
|
|
4
4
|
t as assistantCardReplayFields,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { z as e } from "zod";
|
|
2
|
-
import { s as
|
|
3
|
-
import { a as
|
|
4
|
-
import { e as O,
|
|
5
|
-
import { t as C } from "../chunks/add-to-dashboard-
|
|
6
|
-
import { A as
|
|
7
|
-
import { p as
|
|
8
|
-
import { A as
|
|
2
|
+
import { s as g } from "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
3
|
+
import { a as p, A as s, b as x, c } from "../chunks/context-BTLBjQNh.js";
|
|
4
|
+
import { e as O, k as L, l as q, o as F, g as U, d as $, n as M, h as P, m as j, i as w, j as V, f as Y, r as J } from "../chunks/context-BTLBjQNh.js";
|
|
5
|
+
import { t as C } from "../chunks/add-to-dashboard-DQFuDA5R.js";
|
|
6
|
+
import { A as W, n as X, C as z, e as G, l as H, k as Q, f as Z, o as ee, p as se, r as ae, u as te, q as oe, s as re, h as ne, m as de, i as ie, d as ce, a as le, j as ue, c as Se, b as me, g as Ae, v as he, w as be } from "../chunks/add-to-dashboard-DQFuDA5R.js";
|
|
7
|
+
import { p as Te, a as ge, r as pe } from "../chunks/availability-Bp5Gfu1I.js";
|
|
8
|
+
import { A as Ce, a as ye, D as _e, i as Ie } from "../chunks/conversation-sQiWYUOb.js";
|
|
9
9
|
const y = [
|
|
10
10
|
"matrix",
|
|
11
11
|
"no_query",
|
|
@@ -16,8 +16,8 @@ const y = [
|
|
|
16
16
|
turnId: e.string().min(1).max(s.idChars),
|
|
17
17
|
conversationId: e.string().min(1).max(s.idChars).optional(),
|
|
18
18
|
message: e.string().min(1).max(s.messageChars),
|
|
19
|
-
context:
|
|
20
|
-
addedSources: e.array(
|
|
19
|
+
context: p,
|
|
20
|
+
addedSources: e.array(g).max(s.addedSources),
|
|
21
21
|
selectedCardRequest: e.object({
|
|
22
22
|
cardId: e.string().min(1).max(s.idChars),
|
|
23
23
|
connectionId: e.string().min(1).max(s.idChars),
|
|
@@ -28,16 +28,16 @@ const y = [
|
|
|
28
28
|
reason: e.enum(y),
|
|
29
29
|
message: e.string().max(s.textChars).optional()
|
|
30
30
|
}).strict().optional(),
|
|
31
|
-
taggedFields: e.array(
|
|
31
|
+
taggedFields: e.array(x).max(s.taggedFields).optional(),
|
|
32
32
|
// The document's own shape is the dashboard's; propose reads it through
|
|
33
33
|
// the resolver and the save's validation. Here only what routes it.
|
|
34
34
|
openDashboard: e.object({ id: e.string().min(1).max(s.idChars), sheets: e.array(e.unknown()) }).passthrough().optional()
|
|
35
|
-
}).strict(),
|
|
36
|
-
function
|
|
37
|
-
var
|
|
35
|
+
}).strict(), T = s.requestBytes + s.openDashboardBytes;
|
|
36
|
+
function k(r) {
|
|
37
|
+
var b;
|
|
38
38
|
const n = new TextEncoder().encode(r).length;
|
|
39
|
-
if (n >
|
|
40
|
-
return d(`body: ${n} bytes exceeds ${
|
|
39
|
+
if (n > T)
|
|
40
|
+
return d(`body: ${n} bytes exceeds ${T}`);
|
|
41
41
|
let a;
|
|
42
42
|
try {
|
|
43
43
|
a = JSON.parse(r);
|
|
@@ -75,17 +75,17 @@ function v(r) {
|
|
|
75
75
|
};
|
|
76
76
|
if (!o.data.message.trim())
|
|
77
77
|
return { ok: !1, code: "context_invalid", issues: ["message: must not be blank"] };
|
|
78
|
-
const { selectedCardRequest:
|
|
79
|
-
...
|
|
80
|
-
...
|
|
81
|
-
],
|
|
78
|
+
const { selectedCardRequest: S, selectedCardUnavailable: m } = o.data, A = (b = o.data.context.selectedCard) == null ? void 0 : b.id, i = [
|
|
79
|
+
...S ? [["selectedCardRequest", S.cardId]] : [],
|
|
80
|
+
...m ? [["selectedCardUnavailable", m.cardId]] : []
|
|
81
|
+
], h = [
|
|
82
82
|
...i.length > 1 ? ["selectedCardRequest, selectedCardUnavailable: send one of them, not both"] : [],
|
|
83
|
-
...i.filter(([, t]) => t !==
|
|
84
|
-
...
|
|
83
|
+
...i.filter(([, t]) => t !== A).map(([t]) => `${t}: not the card the context asks about`),
|
|
84
|
+
...A && i.length === 0 ? ["selectedCardRequest: the asked-about card needs its request or selectedCardUnavailable"] : [],
|
|
85
85
|
...C(o.data.context, o.data.taggedFields ?? []),
|
|
86
86
|
...I(o.data.context, o.data.openDashboard)
|
|
87
87
|
];
|
|
88
|
-
return
|
|
88
|
+
return h.length ? { ok: !1, code: "context_invalid", issues: h } : { ok: !0, value: o.data };
|
|
89
89
|
}
|
|
90
90
|
function I(r, n) {
|
|
91
91
|
var a;
|
|
@@ -95,53 +95,56 @@ function d(r) {
|
|
|
95
95
|
return { ok: !1, code: "context_too_large", issues: [r] };
|
|
96
96
|
}
|
|
97
97
|
export {
|
|
98
|
-
|
|
99
|
-
|
|
98
|
+
W as ANSWER_PART_PLACEMENT,
|
|
99
|
+
X as ASSISTANT_CARD_TYPES,
|
|
100
100
|
y as ASSISTANT_CARD_UNAVAILABLE_REASONS,
|
|
101
101
|
O as ASSISTANT_CONTEXT_VERSION,
|
|
102
|
-
|
|
102
|
+
Ce as ASSISTANT_LAYOUTS,
|
|
103
103
|
s as ASSISTANT_LIMITS,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
104
|
+
ye as ASSISTANT_NAME_MAX_CHARS,
|
|
105
|
+
L as ASSISTANT_PARTS_VERSION,
|
|
106
|
+
q as ASSISTANT_REFUSAL_CODES,
|
|
107
|
+
F as ASSISTANT_REFUSAL_MESSAGES,
|
|
108
|
+
U as ASSISTANT_SURFACES,
|
|
109
|
+
T as ASSISTANT_TURN_BODY_BYTES,
|
|
110
|
+
$ as AssistantContextTooLargeError,
|
|
111
|
+
z as COPIED_CONVERSATION_FIELDS,
|
|
112
|
+
G as COPIED_TURN_FIELDS,
|
|
113
|
+
_e as DEFAULT_ASSISTANT_NAME,
|
|
114
|
+
H as addableSourceKey,
|
|
115
|
+
Q as answerTextOf,
|
|
116
|
+
x as assistantCardFieldSchema,
|
|
117
|
+
p as assistantContextSchema,
|
|
116
118
|
c as assistantJsonBytes,
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
119
|
+
M as assistantRefusalMessage,
|
|
120
|
+
P as compareAssistantContexts,
|
|
121
|
+
Z as conversationText,
|
|
122
|
+
j as dailyLimitMessage,
|
|
123
|
+
w as describeCardField,
|
|
124
|
+
V as describeSource,
|
|
125
|
+
Y as fitAssistantText,
|
|
126
|
+
Ie as isAssistantLayout,
|
|
127
|
+
ee as modelChangeLinkOutcomeWords,
|
|
128
|
+
se as modelChangeLinkRefusal,
|
|
129
|
+
ae as modelChangeOutcomeUnclear,
|
|
130
|
+
te as modelChangeRefusalMessage,
|
|
131
|
+
Te as parseAssistantTokenConfig,
|
|
132
|
+
k as parseAssistantTurnRequest,
|
|
133
|
+
oe as questionForModel,
|
|
134
|
+
ge as readAssistantTokenConfig,
|
|
135
|
+
J as renderContextForModel,
|
|
136
|
+
pe as resolveAssistantAvailability,
|
|
137
|
+
re as sameCardField,
|
|
138
|
+
ne as showsInAnswerBody,
|
|
139
|
+
de as sourceRefLabel,
|
|
140
|
+
ie as storedPartKind,
|
|
141
|
+
ce as storedTurnEnding,
|
|
142
|
+
le as taggableFields,
|
|
141
143
|
C as taggedFieldIssues,
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
144
|
+
ue as textPartKind,
|
|
145
|
+
Se as toTranscriptChunks,
|
|
146
|
+
me as toTranscriptPart,
|
|
147
|
+
Ae as toolName,
|
|
148
|
+
he as visualInputOf,
|
|
149
|
+
be as workingNotesOf
|
|
147
150
|
};
|
package/dist/briefings/index.js
CHANGED
|
@@ -5,7 +5,7 @@ import "zod";
|
|
|
5
5
|
import "../chunks/matrix-operation-contract-DCVinw1o.js";
|
|
6
6
|
import "../chunks/analytics-base-schemas-BaIQrEzX.js";
|
|
7
7
|
import "../value-format-preferences/index.js";
|
|
8
|
-
import { A as g, J as l, a2 as B, F as m, a4 as E, z as c, B as I, E as T, K as d, C, D as u, M as A, Z as h, i as p, _ as D, $ as _, a5 as b, n as F, l as S, m as R, P as N, k as y, R as M, f as O, e as G, S as v, u as x, q as L, c as U, d as V, I as z, H, h as J, b as P, a as q, a6 as X, g as K, a0 as Q, V as Y, a3 as j, W as k, G as W, a1 as Z, r as $, j as w, X as ee, Y as ie, o as ae, L as re, Q as te, O as se, p as ne, s as oe, t as fe, N as ge, T as le, U as Be } from "../chunks/index-
|
|
8
|
+
import { A as g, J as l, a2 as B, F as m, a4 as E, z as c, B as I, E as T, K as d, C, D as u, M as A, Z as h, i as p, _ as D, $ as _, a5 as b, n as F, l as S, m as R, P as N, k as y, R as M, f as O, e as G, S as v, u as x, q as L, c as U, d as V, I as z, H, h as J, b as P, a as q, a6 as X, g as K, a0 as Q, V as Y, a3 as j, W as k, G as W, a1 as Z, r as $, j as w, X as ee, Y as ie, o as ae, L as re, Q as te, O as se, p as ne, s as oe, t as fe, N as ge, T as le, U as Be } from "../chunks/index-CwlaI-UP.js";
|
|
9
9
|
export {
|
|
10
10
|
g as BRIEFING_ARTIFACT_FORMATS,
|
|
11
11
|
l as BRIEFING_ATTACHMENT_FORMATS,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { A as c,
|
|
1
|
+
import { A as c, i as k, o as f } from "./context-BTLBjQNh.js";
|
|
2
2
|
function h(e, t) {
|
|
3
3
|
return e.role === t.role && e.name === t.name && e.aggregate === t.aggregate && e.granularity === t.granularity;
|
|
4
4
|
}
|
|
@@ -7,14 +7,14 @@ function _(e) {
|
|
|
7
7
|
const t = (o = e.selectedCard) == null ? void 0 : o.description;
|
|
8
8
|
return (t == null ? void 0 : t.status) !== "described" || t.sql || ((s = e.editing) == null ? void 0 : s.mode) === "sql" ? [] : t.fields;
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function R(e, t) {
|
|
11
11
|
if (t.length === 0) return [];
|
|
12
12
|
if (t.length > c.taggedFields)
|
|
13
13
|
return [`taggedFields: at most ${c.taggedFields}`];
|
|
14
14
|
const o = _(e);
|
|
15
15
|
return t.flatMap((s, n) => o.some((a) => h(a, s)) ? t.slice(0, n).some((a) => h(a, s)) ? [`taggedFields.${n}: tagged twice`] : [] : [`taggedFields.${n}: not a field of the card the context asks about`]);
|
|
16
16
|
}
|
|
17
|
-
function
|
|
17
|
+
function j(e, t) {
|
|
18
18
|
return t != null && t.length ? `Fields of the asked-about card the user tagged in this question: ${t.map(k).join("; ")}.
|
|
19
19
|
|
|
20
20
|
${e}` : e;
|
|
@@ -28,7 +28,7 @@ function y(e) {
|
|
|
28
28
|
data: o
|
|
29
29
|
};
|
|
30
30
|
}
|
|
31
|
-
function
|
|
31
|
+
function q(e, t) {
|
|
32
32
|
return e.kind !== "text" ? [y(e)] : [
|
|
33
33
|
{ type: "text-start", id: t },
|
|
34
34
|
{ type: "text-delta", id: t, delta: e.text },
|
|
@@ -65,13 +65,16 @@ const p = {
|
|
|
65
65
|
proposal_refused: "body",
|
|
66
66
|
model_change: "body"
|
|
67
67
|
};
|
|
68
|
-
function
|
|
68
|
+
function M(e) {
|
|
69
69
|
return Object.hasOwn(p, e) && p[e] === "body";
|
|
70
70
|
}
|
|
71
71
|
function $(e) {
|
|
72
|
-
return e.kind === "text" ?
|
|
72
|
+
return e.kind === "text" ? C(e.text) : e.kind === "stage" && !e.change ? "step" : "other";
|
|
73
73
|
}
|
|
74
|
-
function
|
|
74
|
+
function C(e) {
|
|
75
|
+
return e.trim().length > 0 ? "text" : "other";
|
|
76
|
+
}
|
|
77
|
+
function P(e) {
|
|
75
78
|
const t = b(e, $);
|
|
76
79
|
return e.flatMap((o) => o.kind === "text" && !t.has(o) ? [o.text] : []).filter((o) => o.trim().length > 0).join(`
|
|
77
80
|
|
|
@@ -83,13 +86,13 @@ const g = {
|
|
|
83
86
|
not_permitted: "You don’t have permission to change the data model.",
|
|
84
87
|
apply_in_progress: "They’re still being added.",
|
|
85
88
|
apply_outcome_unknown: "It isn’t clear whether they were added. Check the data model before asking again."
|
|
86
|
-
},
|
|
89
|
+
}, T = "They couldn’t be added.", m = {
|
|
87
90
|
exists: () => "it’s already in the model",
|
|
88
91
|
missing_fields: (e) => `a dataset or field it uses is no longer in ${e}`,
|
|
89
92
|
type_mismatch: () => "its fields’ types don’t match",
|
|
90
93
|
not_supported: () => "the data doesn’t support it"
|
|
91
94
|
};
|
|
92
|
-
function
|
|
95
|
+
function x(e, t) {
|
|
93
96
|
switch (e == null ? void 0 : e.status) {
|
|
94
97
|
case "added":
|
|
95
98
|
return "added";
|
|
@@ -110,15 +113,15 @@ function N(e, t) {
|
|
|
110
113
|
function A(e) {
|
|
111
114
|
return e === "apply_outcome_unknown";
|
|
112
115
|
}
|
|
113
|
-
function
|
|
114
|
-
return typeof e == "string" && Object.hasOwn(g, e) ? g[e] :
|
|
116
|
+
function I(e) {
|
|
117
|
+
return typeof e == "string" && Object.hasOwn(g, e) ? g[e] : T;
|
|
115
118
|
}
|
|
116
|
-
const
|
|
119
|
+
const U = {
|
|
117
120
|
conversationId: "with tool calls",
|
|
118
121
|
addedSources: "left out",
|
|
119
122
|
allows: "left out",
|
|
120
123
|
turns: "shown"
|
|
121
|
-
},
|
|
124
|
+
}, B = {
|
|
122
125
|
turnId: "left out",
|
|
123
126
|
startedAt: "shown",
|
|
124
127
|
// the first turn's, in the header
|
|
@@ -132,14 +135,14 @@ const P = {
|
|
|
132
135
|
model: "with tool calls",
|
|
133
136
|
instructionsVersion: "with tool calls"
|
|
134
137
|
};
|
|
135
|
-
function
|
|
138
|
+
function K(e, t) {
|
|
136
139
|
var a;
|
|
137
140
|
const o = (a = e.turns[0]) == null ? void 0 : a.startedAt, s = [
|
|
138
141
|
`${t.assistantName} conversation${o ? ` · ${o.slice(0, 16).replace("T", " ")} UTC` : ""}`,
|
|
139
142
|
...t.toolCalls ? [`Conversation ${e.conversationId}`] : []
|
|
140
143
|
], n = e.turns.map((r) => {
|
|
141
|
-
const d = [`You: ${
|
|
142
|
-
return d.push(...
|
|
144
|
+
const d = [`You: ${v(r)}`, "", `${t.assistantName}:`], i = S(r.outcome), u = [...r.parts, ...i ? [i] : []];
|
|
145
|
+
return d.push(...O(u)), t.toolCalls && r.toolCalls && d.push(...E(r.toolCalls, r.model, r.instructionsVersion)), d.join(`
|
|
143
146
|
`);
|
|
144
147
|
});
|
|
145
148
|
return [s.join(`
|
|
@@ -148,10 +151,10 @@ function B(e, t) {
|
|
|
148
151
|
`) + `
|
|
149
152
|
`;
|
|
150
153
|
}
|
|
151
|
-
function
|
|
154
|
+
function v(e) {
|
|
152
155
|
return [...(e.taggedFields ?? []).map((o) => `@${o.label}`), e.message].join(" ");
|
|
153
156
|
}
|
|
154
|
-
function
|
|
157
|
+
function O(e) {
|
|
155
158
|
const t = b(e, $), o = /* @__PURE__ */ new Set(), s = [];
|
|
156
159
|
for (const n of e)
|
|
157
160
|
switch (n.kind) {
|
|
@@ -165,7 +168,7 @@ function v(e) {
|
|
|
165
168
|
s.push("Not added", `! ${n.message}`);
|
|
166
169
|
break;
|
|
167
170
|
case "model_change":
|
|
168
|
-
s.push(...
|
|
171
|
+
s.push(...L(n));
|
|
169
172
|
break;
|
|
170
173
|
case "clarify":
|
|
171
174
|
s.push(
|
|
@@ -192,27 +195,27 @@ function v(e) {
|
|
|
192
195
|
}
|
|
193
196
|
return o.size && s.push(`(${o.size} ${o.size === 1 ? "step" : "steps"})`), s;
|
|
194
197
|
}
|
|
195
|
-
function
|
|
198
|
+
function E(e, t, o) {
|
|
196
199
|
const s = ["", "Tool calls:"];
|
|
197
200
|
return (t || o) && s.push(` model ${t ?? "unknown"}${o ? ` · instructions ${o}` : ""}`), e.length || s.push(" none"), e.forEach((n, a) => {
|
|
198
|
-
var
|
|
199
|
-
const r = n.durationMs === void 0 ? "" : ` · ${n.durationMs} ms`, d = n.rowCount === void 0 ? "" : ` · ${n.rowCount} ${n.rowCount === 1 ? "row" : "rows"}`, i = n.ok || (
|
|
201
|
+
var l;
|
|
202
|
+
const r = n.durationMs === void 0 ? "" : ` · ${n.durationMs} ms`, d = n.rowCount === void 0 ? "" : ` · ${n.rowCount} ${n.rowCount === 1 ? "row" : "rows"}`, i = n.ok || (l = n.error) == null ? void 0 : l.trim(), u = i && !i.includes(`
|
|
200
203
|
`) ? `: ${i}` : "";
|
|
201
|
-
s.push(` ${a + 1}. ${
|
|
204
|
+
s.push(` ${a + 1}. ${F(n.tool)}${r}${d} · ${n.ok ? "ok" : `failed${u}`}`), i && !u && s.push(" error:", ...w(i)), i && !u && s.push(" input:"), s.push(...w(JSON.stringify(n.input ?? {}, null, 2)));
|
|
202
205
|
}), s;
|
|
203
206
|
}
|
|
204
207
|
function w(e) {
|
|
205
208
|
return e.split(`
|
|
206
209
|
`).map((t) => ` ${t}`);
|
|
207
210
|
}
|
|
208
|
-
function
|
|
211
|
+
function F(e) {
|
|
209
212
|
return e.replace(/^semaphor_/, "");
|
|
210
213
|
}
|
|
211
|
-
function
|
|
214
|
+
function L(e) {
|
|
212
215
|
const t = e.changes.map((s) => s.sentence ?? s.op), o = e.outcome;
|
|
213
|
-
return o ? o.status === "dismissed" ? ["Data model change (not added: Not now)", ...t.map((s) => `+ ${s}`)] : o.status === "refused" ? [`Data model change (${A(o.code) ? "unclear whether added" : "not added"}: ${
|
|
216
|
+
return o ? o.status === "dismissed" ? ["Data model change (not added: Not now)", ...t.map((s) => `+ ${s}`)] : o.status === "refused" ? [`Data model change (${A(o.code) ? "unclear whether added" : "not added"}: ${I(o.code)})`, ...t.map((n) => `+ ${n}`)] : [
|
|
214
217
|
"Data model change",
|
|
215
|
-
...t.map((s, n) => `+ ${s} (${
|
|
218
|
+
...t.map((s, n) => `+ ${s} (${x(o.links[n], e.domainLabel)})`)
|
|
216
219
|
] : ["Data model change (proposed)", ...t.map((s) => `+ ${s}`)];
|
|
217
220
|
}
|
|
218
221
|
function z(e) {
|
|
@@ -222,7 +225,7 @@ function z(e) {
|
|
|
222
225
|
function J(e) {
|
|
223
226
|
return e.label ?? (e.kind === "semantic" ? e.datasetName : e.kind === "physical" ? e.tableName : "SQL");
|
|
224
227
|
}
|
|
225
|
-
function
|
|
228
|
+
function V(e) {
|
|
226
229
|
return {
|
|
227
230
|
columns: e.columns,
|
|
228
231
|
records: e.records,
|
|
@@ -232,7 +235,7 @@ function K(e) {
|
|
|
232
235
|
truncated: e.status.truncated
|
|
233
236
|
};
|
|
234
237
|
}
|
|
235
|
-
const
|
|
238
|
+
const Y = {
|
|
236
239
|
number: "kpi",
|
|
237
240
|
line: "line",
|
|
238
241
|
bar: "bar",
|
|
@@ -241,27 +244,28 @@ const V = {
|
|
|
241
244
|
};
|
|
242
245
|
export {
|
|
243
246
|
p as A,
|
|
244
|
-
|
|
247
|
+
U as C,
|
|
245
248
|
_ as a,
|
|
246
249
|
y as b,
|
|
247
|
-
|
|
250
|
+
q as c,
|
|
248
251
|
S as d,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
252
|
+
B as e,
|
|
253
|
+
K as f,
|
|
254
|
+
F as g,
|
|
255
|
+
M as h,
|
|
253
256
|
$ as i,
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
257
|
+
C as j,
|
|
258
|
+
P as k,
|
|
259
|
+
z as l,
|
|
260
|
+
J as m,
|
|
261
|
+
Y as n,
|
|
262
|
+
x as o,
|
|
263
|
+
N as p,
|
|
264
|
+
j as q,
|
|
265
|
+
A as r,
|
|
263
266
|
h as s,
|
|
264
|
-
|
|
265
|
-
|
|
267
|
+
R as t,
|
|
268
|
+
I as u,
|
|
269
|
+
V as v,
|
|
266
270
|
b as w
|
|
267
271
|
};
|