@zeniai/client-epic-state 5.0.63 → 5.0.64-beta1ND
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.
|
@@ -40,6 +40,8 @@ export interface AiCfoAnswerPayload {
|
|
|
40
40
|
text: string;
|
|
41
41
|
type: string;
|
|
42
42
|
visualization: AiCfoVisualizationPayload | null;
|
|
43
|
+
artifact?: string | null;
|
|
44
|
+
artifact_title?: string | null;
|
|
43
45
|
follow_up_questions?: string[];
|
|
44
46
|
table?: AiCfoVisualizationPayload | null;
|
|
45
47
|
}
|
|
@@ -115,6 +115,8 @@ function chatHistoryToQA(history) {
|
|
|
115
115
|
insights: parsedAgentMessage.insights ?? '',
|
|
116
116
|
summarizedTitle: parsedAgentMessage.summarized_title ?? undefined,
|
|
117
117
|
chainOfThoughtActionSteps: [],
|
|
118
|
+
artifact: parsedAgentMessage.artifact ?? undefined,
|
|
119
|
+
artifactTitle: parsedAgentMessage.artifact_title ?? undefined,
|
|
118
120
|
},
|
|
119
121
|
createdAt: (0, zeniDayJS_1.date)(agentMessage.created_at),
|
|
120
122
|
};
|
|
@@ -185,7 +187,7 @@ const toAiCfoVisualizationData = (data) => {
|
|
|
185
187
|
};
|
|
186
188
|
};
|
|
187
189
|
const toResponseBlockType = (answer, userId) => {
|
|
188
|
-
const { metadata, state, type, text, visualization, table, follow_up_questions, assumptions, insights, summarized_title, } = answer;
|
|
190
|
+
const { metadata, state, type, text, visualization, table, follow_up_questions, assumptions, insights, summarized_title, artifact, artifact_title, } = answer;
|
|
189
191
|
const { chat_session_id, message_id, timestamp, chain_of_thought_action_steps: chainOfThoughtActionSteps = [], } = metadata;
|
|
190
192
|
return {
|
|
191
193
|
messageId: message_id,
|
|
@@ -203,6 +205,8 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
203
205
|
insights: insights ?? '',
|
|
204
206
|
summarizedTitle: summarized_title ?? undefined,
|
|
205
207
|
chainOfThoughtActionSteps,
|
|
208
|
+
artifact: artifact ?? undefined,
|
|
209
|
+
artifactTitle: artifact_title ?? undefined,
|
|
206
210
|
},
|
|
207
211
|
createdAt: (0, zeniDayJS_1.date)(timestamp),
|
|
208
212
|
};
|
|
@@ -111,6 +111,8 @@ function chatHistoryToQA(history) {
|
|
|
111
111
|
insights: parsedAgentMessage.insights ?? '',
|
|
112
112
|
summarizedTitle: parsedAgentMessage.summarized_title ?? undefined,
|
|
113
113
|
chainOfThoughtActionSteps: [],
|
|
114
|
+
artifact: parsedAgentMessage.artifact ?? undefined,
|
|
115
|
+
artifactTitle: parsedAgentMessage.artifact_title ?? undefined,
|
|
114
116
|
},
|
|
115
117
|
createdAt: zeniDate(agentMessage.created_at),
|
|
116
118
|
};
|
|
@@ -180,7 +182,7 @@ const toAiCfoVisualizationData = (data) => {
|
|
|
180
182
|
};
|
|
181
183
|
};
|
|
182
184
|
const toResponseBlockType = (answer, userId) => {
|
|
183
|
-
const { metadata, state, type, text, visualization, table, follow_up_questions, assumptions, insights, summarized_title, } = answer;
|
|
185
|
+
const { metadata, state, type, text, visualization, table, follow_up_questions, assumptions, insights, summarized_title, artifact, artifact_title, } = answer;
|
|
184
186
|
const { chat_session_id, message_id, timestamp, chain_of_thought_action_steps: chainOfThoughtActionSteps = [], } = metadata;
|
|
185
187
|
return {
|
|
186
188
|
messageId: message_id,
|
|
@@ -198,6 +200,8 @@ const toResponseBlockType = (answer, userId) => {
|
|
|
198
200
|
insights: insights ?? '',
|
|
199
201
|
summarizedTitle: summarized_title ?? undefined,
|
|
200
202
|
chainOfThoughtActionSteps,
|
|
203
|
+
artifact: artifact ?? undefined,
|
|
204
|
+
artifactTitle: artifact_title ?? undefined,
|
|
201
205
|
},
|
|
202
206
|
createdAt: zeniDate(timestamp),
|
|
203
207
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.64-beta1ND",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib/esm/index.js",
|
|
@@ -106,12 +106,16 @@
|
|
|
106
106
|
"scripts": {
|
|
107
107
|
"clean": "rimraf lib",
|
|
108
108
|
"test:typecheck": "echo 'Typechecking test files...' && NODE_OPTIONS=--max-old-space-size=4096 time tsc -p tsconfig.typecheck.json",
|
|
109
|
-
"test": "
|
|
109
|
+
"test:typecheck-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh master tsconfig.typecheck.json",
|
|
110
|
+
"test": "pnpm lint-modified-files && pnpm test:typecheck-modified-files && vitest run --typecheck",
|
|
110
111
|
"lint": "eslint . --ext .js,.jsx,.ts,.tsx --fix",
|
|
112
|
+
"lint-modified-files": "chmod +x ./scripts/lint-modified-files.sh && ./scripts/lint-modified-files.sh",
|
|
113
|
+
"tsc-modified-files": "chmod +x ./scripts/tsc-modified-files.sh && ./scripts/tsc-modified-files.sh",
|
|
114
|
+
"typecheck": "tsc --noEmit",
|
|
111
115
|
"find-dead-code": "ts-prune | grep -v '(used in module)'",
|
|
112
116
|
"find-unused-exports": "ts-unused-exports ./tsconfig.json",
|
|
113
117
|
"circular-dependency": "npx madge --circular --extensions ts ./src",
|
|
114
|
-
"build": "concurrently --kill-others-on-fail --handle-input \"echo 'Running ESLint...' &&
|
|
118
|
+
"build": "concurrently --kill-others-on-fail --handle-input \"echo 'Running ESLint on modified files...' && pnpm lint-modified-files\" \"echo 'TypeScript build in progress...' && time tsc && echo 'ESM build...' && tsc -p tsconfig.esm.json\" \"echo 'Running tests and typecheck...' && pnpm test\" && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
115
119
|
"only-build": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc && tsc -p tsconfig.esm.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
116
120
|
"only-build-dev": "eslint . --ext .js,.jsx,.ts,.tsx && time tsc -p tsconfig.dev.json && tsc -p tsconfig.esm.dev.json && rimraf \"lib/**/__mocks__\" \"lib/**/__testHelpers__\"",
|
|
117
121
|
"format": "prettier --write --ignore-unknown \"src/**/*\" && pnpm lint",
|