@diegoaltoworks/chatter 0.66.0 → 0.67.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/channels/index.js +6 -1
- package/dist/channels/index.mjs +6 -1
- package/dist/channels/matrix/index.js +6 -1
- package/dist/channels/matrix/index.mjs +6 -1
- package/dist/channels/telegram/index.js +6 -1
- package/dist/channels/telegram/index.mjs +6 -1
- package/dist/channels/whatsapp/index.js +6 -1
- package/dist/channels/whatsapp/index.mjs +6 -1
- package/dist/client/src/ChatBot.d.ts +1 -1
- package/dist/client/src/types.d.ts +1 -1
- package/dist/client/src/types.d.ts.map +1 -1
- package/dist/core/pipeline.d.ts +7 -5
- package/dist/core/pipeline.d.ts.map +1 -1
- package/dist/index.js +7 -2
- package/dist/index.mjs +7 -2
- package/dist/mcp-server.js +7 -2
- package/dist/mcp-server.mjs +7 -2
- package/dist/server.js +6 -1
- package/dist/server.mjs +6 -1
- package/dist/types.d.ts +9 -4
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/channels/index.js
CHANGED
|
@@ -263,7 +263,12 @@ async function prepareChat({
|
|
|
263
263
|
mode,
|
|
264
264
|
buckets: resolvedBuckets,
|
|
265
265
|
sender,
|
|
266
|
-
|
|
266
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
267
|
+
// still the array the store returned (no reranker, or one that threw
|
|
268
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
269
|
+
// hook pushed onto its argument would land in the context assembled
|
|
270
|
+
// below.
|
|
271
|
+
retrievedChunks: [...retrievedChunks]
|
|
267
272
|
});
|
|
268
273
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
269
274
|
} catch (error) {
|
package/dist/channels/index.mjs
CHANGED
|
@@ -229,7 +229,12 @@ async function prepareChat({
|
|
|
229
229
|
mode,
|
|
230
230
|
buckets: resolvedBuckets,
|
|
231
231
|
sender,
|
|
232
|
-
|
|
232
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
233
|
+
// still the array the store returned (no reranker, or one that threw
|
|
234
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
235
|
+
// hook pushed onto its argument would land in the context assembled
|
|
236
|
+
// below.
|
|
237
|
+
retrievedChunks: [...retrievedChunks]
|
|
233
238
|
});
|
|
234
239
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
235
240
|
} catch (error) {
|
|
@@ -500,7 +500,12 @@ async function prepareChat({
|
|
|
500
500
|
mode,
|
|
501
501
|
buckets: resolvedBuckets,
|
|
502
502
|
sender,
|
|
503
|
-
|
|
503
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
504
|
+
// still the array the store returned (no reranker, or one that threw
|
|
505
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
506
|
+
// hook pushed onto its argument would land in the context assembled
|
|
507
|
+
// below.
|
|
508
|
+
retrievedChunks: [...retrievedChunks]
|
|
504
509
|
});
|
|
505
510
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
506
511
|
} catch (error) {
|
|
@@ -452,7 +452,12 @@ async function prepareChat({
|
|
|
452
452
|
mode,
|
|
453
453
|
buckets: resolvedBuckets,
|
|
454
454
|
sender,
|
|
455
|
-
|
|
455
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
456
|
+
// still the array the store returned (no reranker, or one that threw
|
|
457
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
458
|
+
// hook pushed onto its argument would land in the context assembled
|
|
459
|
+
// below.
|
|
460
|
+
retrievedChunks: [...retrievedChunks]
|
|
456
461
|
});
|
|
457
462
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
458
463
|
} catch (error) {
|
|
@@ -393,7 +393,12 @@ async function prepareChat({
|
|
|
393
393
|
mode,
|
|
394
394
|
buckets: resolvedBuckets,
|
|
395
395
|
sender,
|
|
396
|
-
|
|
396
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
397
|
+
// still the array the store returned (no reranker, or one that threw
|
|
398
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
399
|
+
// hook pushed onto its argument would land in the context assembled
|
|
400
|
+
// below.
|
|
401
|
+
retrievedChunks: [...retrievedChunks]
|
|
397
402
|
});
|
|
398
403
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
399
404
|
} catch (error) {
|
|
@@ -348,7 +348,12 @@ async function prepareChat({
|
|
|
348
348
|
mode,
|
|
349
349
|
buckets: resolvedBuckets,
|
|
350
350
|
sender,
|
|
351
|
-
|
|
351
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
352
|
+
// still the array the store returned (no reranker, or one that threw
|
|
353
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
354
|
+
// hook pushed onto its argument would land in the context assembled
|
|
355
|
+
// below.
|
|
356
|
+
retrievedChunks: [...retrievedChunks]
|
|
352
357
|
});
|
|
353
358
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
354
359
|
} catch (error) {
|
|
@@ -1023,7 +1023,12 @@ async function prepareChat({
|
|
|
1023
1023
|
mode,
|
|
1024
1024
|
buckets: resolvedBuckets,
|
|
1025
1025
|
sender,
|
|
1026
|
-
|
|
1026
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
1027
|
+
// still the array the store returned (no reranker, or one that threw
|
|
1028
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
1029
|
+
// hook pushed onto its argument would land in the context assembled
|
|
1030
|
+
// below.
|
|
1031
|
+
retrievedChunks: [...retrievedChunks]
|
|
1027
1032
|
});
|
|
1028
1033
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
1029
1034
|
} catch (error) {
|
|
@@ -958,7 +958,12 @@ async function prepareChat({
|
|
|
958
958
|
mode,
|
|
959
959
|
buckets: resolvedBuckets,
|
|
960
960
|
sender,
|
|
961
|
-
|
|
961
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
962
|
+
// still the array the store returned (no reranker, or one that threw
|
|
963
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
964
|
+
// hook pushed onto its argument would land in the context assembled
|
|
965
|
+
// below.
|
|
966
|
+
retrievedChunks: [...retrievedChunks]
|
|
962
967
|
});
|
|
963
968
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
964
969
|
} catch (error) {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export type ChatMode = "public" | "private";
|
|
5
5
|
export interface ChatBotConfig {
|
|
6
|
-
/** Host of the
|
|
6
|
+
/** Host of the Chatter server (e.g., 'api.example.com' - protocol will be added automatically) */
|
|
7
7
|
host: string;
|
|
8
8
|
/** Either 'public' or 'private' */
|
|
9
9
|
mode: ChatMode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/client/src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,CAAC;AAE5C,MAAM,WAAW,aAAa;IAC5B,kGAAkG;IAClG,IAAI,EAAE,MAAM,CAAC;IACb,mCAAmC;IACnC,IAAI,EAAE,QAAQ,CAAC;IACf,iCAAiC;IACjC,MAAM,EAAE,MAAM,CAAC;IACf,sDAAsD;IACtD,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACjC,KAAK,CAAC,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,UAAW,SAAQ,aAAa;IAC/C,yEAAyE;IACzE,SAAS,EAAE,WAAW,GAAG,MAAM,CAAC;IAChC,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,kCAAkC;IAClC,eAAe,CAAC,EAAE,WAAW,EAAE,CAAC;IAChC,+BAA+B;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8BAA8B;IAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,0DAA0D;IAC1D,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;CACtB;AAED,MAAM,WAAW,gBAAiB,SAAQ,aAAa;IACrD,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,cAAc,GAAG,aAAa,GAAG,WAAW,GAAG,UAAU,CAAC;IACrE,0BAA0B;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC,mBAAmB,CAAC,CAAC;IACtC,gCAAgC;IAChC,UAAU,CAAC,EAAE,OAAO,CAAC,IAAI,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC,CAAC,CAAC;CAC9E"}
|
package/dist/core/pipeline.d.ts
CHANGED
|
@@ -70,11 +70,13 @@ export interface FallbackContext {
|
|
|
70
70
|
/** Caller identity, where the surface has one. Absent on anonymous surfaces. */
|
|
71
71
|
sender?: string;
|
|
72
72
|
/**
|
|
73
|
-
* What `store.query` returned, before `rerankContext` ran
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
73
|
+
* What `store.query` returned for this turn, before `rerankContext` ran.
|
|
74
|
+
* `fallbackFn` runs only when the post-rerank context is empty, so this
|
|
75
|
+
* array is non-empty exactly when `rerankContext` filtered every retrieved
|
|
76
|
+
* chunk out, and empty exactly when the store itself found nothing. A hook
|
|
77
|
+
* can use that to tell "some low-confidence signal existed" apart from
|
|
78
|
+
* "nothing matched at all". It is a copy, so mutating it in place cannot
|
|
79
|
+
* change the context the turn goes on to answer with.
|
|
78
80
|
*/
|
|
79
81
|
retrievedChunks: string[];
|
|
80
82
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pipeline.d.ts","sourceRoot":"","sources":["../../src/core/pipeline.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAGH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,MAAM,MAAM,YAAY,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,GAAG,WAAW,CAAC;IAC3B,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,YAAY;IAC3B,4EAA4E;IAC5E,MAAM,EAAE,MAAM,CAAC;IACf,uCAAuC;IACvC,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,iIAAiI;IACjI,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,2CAA2C;AAC3C,MAAM,WAAW,gBAAgB;IAC/B,qFAAqF;IACrF,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,YAAY,CAAC;IACnB,gFAAgF;IAChF,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,GAAG,E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E,YAAY,CAAC;IACnB,QAAQ,EAAE,eAAe,EAAE,CAAC;IAC5B,gEAAgE;IAChE,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,kEAAkE;IAClE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,uFAAuF;IACvF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yFAAyF;IACzF,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,yGAAyG;IACzG,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,yFAAyF;IACzF,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kHAAkH;IAClH,MAAM,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC,GAAG,OAAO,CAAC,YAAY,CAAC,CAkExB"}
|
package/dist/index.js
CHANGED
|
@@ -967,7 +967,12 @@ async function prepareChat({
|
|
|
967
967
|
mode,
|
|
968
968
|
buckets: resolvedBuckets,
|
|
969
969
|
sender,
|
|
970
|
-
|
|
970
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
971
|
+
// still the array the store returned (no reranker, or one that threw
|
|
972
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
973
|
+
// hook pushed onto its argument would land in the context assembled
|
|
974
|
+
// below.
|
|
975
|
+
retrievedChunks: [...retrievedChunks]
|
|
971
976
|
});
|
|
972
977
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
973
978
|
} catch (error) {
|
|
@@ -1551,7 +1556,7 @@ async function createMCPServer(config) {
|
|
|
1551
1556
|
privateToolConfig.enabled ? privateToolConfig.name : null
|
|
1552
1557
|
].filter(Boolean);
|
|
1553
1558
|
if (enabledTools.length === 0) {
|
|
1554
|
-
log.warn("
|
|
1559
|
+
log.warn("No MCP tools enabled");
|
|
1555
1560
|
}
|
|
1556
1561
|
log.info(
|
|
1557
1562
|
`\u2705 ${config.bot.name} MCP Server ready (transport: ${transportMode}, tools: ${enabledTools.join(", ") || "none"})`
|
package/dist/index.mjs
CHANGED
|
@@ -892,7 +892,12 @@ async function prepareChat({
|
|
|
892
892
|
mode,
|
|
893
893
|
buckets: resolvedBuckets,
|
|
894
894
|
sender,
|
|
895
|
-
|
|
895
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
896
|
+
// still the array the store returned (no reranker, or one that threw
|
|
897
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
898
|
+
// hook pushed onto its argument would land in the context assembled
|
|
899
|
+
// below.
|
|
900
|
+
retrievedChunks: [...retrievedChunks]
|
|
896
901
|
});
|
|
897
902
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
898
903
|
} catch (error) {
|
|
@@ -1476,7 +1481,7 @@ async function createMCPServer(config) {
|
|
|
1476
1481
|
privateToolConfig.enabled ? privateToolConfig.name : null
|
|
1477
1482
|
].filter(Boolean);
|
|
1478
1483
|
if (enabledTools.length === 0) {
|
|
1479
|
-
log.warn("
|
|
1484
|
+
log.warn("No MCP tools enabled");
|
|
1480
1485
|
}
|
|
1481
1486
|
log.info(
|
|
1482
1487
|
`\u2705 ${config.bot.name} MCP Server ready (transport: ${transportMode}, tools: ${enabledTools.join(", ") || "none"})`
|
package/dist/mcp-server.js
CHANGED
|
@@ -706,7 +706,12 @@ async function prepareChat({
|
|
|
706
706
|
mode,
|
|
707
707
|
buckets: resolvedBuckets,
|
|
708
708
|
sender,
|
|
709
|
-
|
|
709
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
710
|
+
// still the array the store returned (no reranker, or one that threw
|
|
711
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
712
|
+
// hook pushed onto its argument would land in the context assembled
|
|
713
|
+
// below.
|
|
714
|
+
retrievedChunks: [...retrievedChunks]
|
|
710
715
|
});
|
|
711
716
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
712
717
|
} catch (error) {
|
|
@@ -1229,7 +1234,7 @@ async function createMCPServer(config) {
|
|
|
1229
1234
|
privateToolConfig.enabled ? privateToolConfig.name : null
|
|
1230
1235
|
].filter(Boolean);
|
|
1231
1236
|
if (enabledTools.length === 0) {
|
|
1232
|
-
log.warn("
|
|
1237
|
+
log.warn("No MCP tools enabled");
|
|
1233
1238
|
}
|
|
1234
1239
|
log.info(
|
|
1235
1240
|
`\u2705 ${config.bot.name} MCP Server ready (transport: ${transportMode}, tools: ${enabledTools.join(", ") || "none"})`
|
package/dist/mcp-server.mjs
CHANGED
|
@@ -678,7 +678,12 @@ async function prepareChat({
|
|
|
678
678
|
mode,
|
|
679
679
|
buckets: resolvedBuckets,
|
|
680
680
|
sender,
|
|
681
|
-
|
|
681
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
682
|
+
// still the array the store returned (no reranker, or one that threw
|
|
683
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
684
|
+
// hook pushed onto its argument would land in the context assembled
|
|
685
|
+
// below.
|
|
686
|
+
retrievedChunks: [...retrievedChunks]
|
|
682
687
|
});
|
|
683
688
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
684
689
|
} catch (error) {
|
|
@@ -1201,7 +1206,7 @@ async function createMCPServer(config) {
|
|
|
1201
1206
|
privateToolConfig.enabled ? privateToolConfig.name : null
|
|
1202
1207
|
].filter(Boolean);
|
|
1203
1208
|
if (enabledTools.length === 0) {
|
|
1204
|
-
log.warn("
|
|
1209
|
+
log.warn("No MCP tools enabled");
|
|
1205
1210
|
}
|
|
1206
1211
|
log.info(
|
|
1207
1212
|
`\u2705 ${config.bot.name} MCP Server ready (transport: ${transportMode}, tools: ${enabledTools.join(", ") || "none"})`
|
package/dist/server.js
CHANGED
|
@@ -915,7 +915,12 @@ async function prepareChat({
|
|
|
915
915
|
mode,
|
|
916
916
|
buckets: resolvedBuckets,
|
|
917
917
|
sender,
|
|
918
|
-
|
|
918
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
919
|
+
// still the array the store returned (no reranker, or one that threw
|
|
920
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
921
|
+
// hook pushed onto its argument would land in the context assembled
|
|
922
|
+
// below.
|
|
923
|
+
retrievedChunks: [...retrievedChunks]
|
|
919
924
|
});
|
|
920
925
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
921
926
|
} catch (error) {
|
package/dist/server.mjs
CHANGED
|
@@ -887,7 +887,12 @@ async function prepareChat({
|
|
|
887
887
|
mode,
|
|
888
888
|
buckets: resolvedBuckets,
|
|
889
889
|
sender,
|
|
890
|
-
|
|
890
|
+
// A copy for the same reason the reranker gets one. Whenever `ctx` is
|
|
891
|
+
// still the array the store returned (no reranker, or one that threw
|
|
892
|
+
// or returned a non-array), the two are the same object, so whatever a
|
|
893
|
+
// hook pushed onto its argument would land in the context assembled
|
|
894
|
+
// below.
|
|
895
|
+
retrievedChunks: [...retrievedChunks]
|
|
891
896
|
});
|
|
892
897
|
if (typeof guidance === "string" && guidance.trim()) fallback = guidance.trim();
|
|
893
898
|
} catch (error) {
|
package/dist/types.d.ts
CHANGED
|
@@ -28,7 +28,7 @@ export interface PricingRates {
|
|
|
28
28
|
* Bot identity configuration
|
|
29
29
|
*/
|
|
30
30
|
export interface BotIdentity {
|
|
31
|
-
/** Bot display name (e.g., "
|
|
31
|
+
/** Bot display name (e.g., "AcmeBot") */
|
|
32
32
|
name: string;
|
|
33
33
|
/** Person or company name the bot represents */
|
|
34
34
|
personName: string;
|
|
@@ -38,12 +38,17 @@ export interface BotIdentity {
|
|
|
38
38
|
description: string;
|
|
39
39
|
}
|
|
40
40
|
/**
|
|
41
|
-
* Bot branding configuration
|
|
41
|
+
* Bot branding configuration.
|
|
42
|
+
*
|
|
43
|
+
* Passthrough only: both colors are published on `GET /config` for a host's
|
|
44
|
+
* own page to read, and nothing shipped applies them. The built-in widgets are
|
|
45
|
+
* styled with the `chatter-ui-` CSS classes (see docs/client.md), so setting a
|
|
46
|
+
* color here does not restyle them.
|
|
42
47
|
*/
|
|
43
48
|
export interface BotBranding {
|
|
44
|
-
/** Primary color for public chat
|
|
49
|
+
/** Primary color to publish for the public chat, for a host page to apply itself */
|
|
45
50
|
publicPrimaryColor?: string;
|
|
46
|
-
/** Primary color for private chat
|
|
51
|
+
/** Primary color to publish for the private chat, for a host page to apply itself */
|
|
47
52
|
privatePrimaryColor?: string;
|
|
48
53
|
}
|
|
49
54
|
/**
|
package/dist/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,MAAM,IAAI,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,MAAM,CAAC;AACjC,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,EAAE,OAAO,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,wBAAwB,CAAC;AACzE,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AACnD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAElD,YAAY,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,W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