@wix/web5-core 1.56.1 → 1.57.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/cjs/client/wixAuthFetch.js +2 -2
- package/dist/cjs/client/wixAuthFetch.js.map +1 -1
- package/dist/cjs/component/componentDefinitions/HeroEntitySectionDefinition.js +20 -15
- package/dist/cjs/component/componentDefinitions/HeroEntitySectionDefinition.js.map +1 -1
- package/dist/cjs/component/componentDefinitions/HeroSectionDefinition.js +12 -4
- package/dist/cjs/component/componentDefinitions/HeroSectionDefinition.js.map +1 -1
- package/dist/cjs/component/componentDefinitions/listItemsSectionDefinition.js +24 -29
- package/dist/cjs/component/componentDefinitions/listItemsSectionDefinition.js.map +1 -1
- package/dist/cjs/component/componentParser.js +8 -1
- package/dist/cjs/component/componentParser.js.map +1 -1
- package/dist/cjs/component/types.js.map +1 -1
- package/dist/cjs/components/placement/PlacementResponseRenderer.css +0 -4
- package/dist/cjs/components/placement/PlacementResponseRenderer.js +11 -33
- package/dist/cjs/components/placement/PlacementResponseRenderer.js.map +1 -1
- package/dist/cjs/components/placement/buildPlacementDependencies.js.map +1 -1
- package/dist/cjs/components/ui/OptimizedImage.js +59 -14
- package/dist/cjs/components/ui/OptimizedImage.js.map +1 -1
- package/dist/cjs/components/ui/SectionSkeleton.css +19 -0
- package/dist/cjs/components/ui/SectionSkeleton.js +8 -4
- package/dist/cjs/components/ui/SectionSkeleton.js.map +1 -1
- package/dist/cjs/components/ui/UserQuery.css +72 -0
- package/dist/cjs/components/ui/UserQuery.js +131 -37
- package/dist/cjs/components/ui/UserQuery.js.map +1 -1
- package/dist/cjs/context/UserQueryContext.js +34 -0
- package/dist/cjs/context/UserQueryContext.js.map +1 -0
- package/dist/cjs/entity/defaultExtractor.js +9 -2
- package/dist/cjs/entity/defaultExtractor.js.map +1 -1
- package/dist/cjs/entity/fetchEntityListData.js +13 -26
- package/dist/cjs/entity/fetchEntityListData.js.map +1 -1
- package/dist/cjs/entity/index.js +5 -1
- package/dist/cjs/entity/index.js.map +1 -1
- package/dist/cjs/entity/listEntityItems.js +90 -0
- package/dist/cjs/entity/listEntityItems.js.map +1 -0
- package/dist/cjs/hostScope.js +63 -0
- package/dist/cjs/hostScope.js.map +1 -0
- package/dist/cjs/index.js +38 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/patternValidator/validator.test.js +61 -61
- package/dist/cjs/patternValidator/validator.test.js.map +1 -1
- package/dist/cjs/registry/ComponentRegistry.js +22 -2
- package/dist/cjs/registry/ComponentRegistry.js.map +1 -1
- package/dist/cjs/registry/index.js +1 -3
- package/dist/cjs/registry/index.js.map +1 -1
- package/dist/cjs/registry/types.js.map +1 -1
- package/dist/cjs/styles/base-utilities.css +35 -0
- package/dist/cjs/styles/components.css +1 -0
- package/dist/cjs/styles/host-reset.css +81 -0
- package/dist/cjs/styles/tailwind-theme.css +6 -6
- package/dist/cjs/utils/backendEnvironment.js +78 -0
- package/dist/cjs/utils/backendEnvironment.js.map +1 -0
- package/dist/cjs/utils/entityLinkParser.js +3 -1
- package/dist/cjs/utils/entityLinkParser.js.map +1 -1
- package/dist/cjs/utils/imageBackdrop.js +269 -0
- package/dist/cjs/utils/imageBackdrop.js.map +1 -0
- package/dist/cjs/utils/intentExtractor.js +20 -9
- package/dist/cjs/utils/intentExtractor.js.map +1 -1
- package/dist/cjs/utils/productBackHandoff.js +106 -0
- package/dist/cjs/utils/productBackHandoff.js.map +1 -0
- package/dist/cjs/utils/refreshPrompts.js +72 -0
- package/dist/cjs/utils/refreshPrompts.js.map +1 -0
- package/dist/esm/client/wixAuthFetch.js +2 -2
- package/dist/esm/client/wixAuthFetch.js.map +1 -1
- package/dist/esm/component/componentDefinitions/HeroEntitySectionDefinition.js +20 -15
- package/dist/esm/component/componentDefinitions/HeroEntitySectionDefinition.js.map +1 -1
- package/dist/esm/component/componentDefinitions/HeroSectionDefinition.js +12 -4
- package/dist/esm/component/componentDefinitions/HeroSectionDefinition.js.map +1 -1
- package/dist/esm/component/componentDefinitions/listItemsSectionDefinition.js +25 -30
- package/dist/esm/component/componentDefinitions/listItemsSectionDefinition.js.map +1 -1
- package/dist/esm/component/componentParser.js +8 -1
- package/dist/esm/component/componentParser.js.map +1 -1
- package/dist/esm/component/types.js.map +1 -1
- package/dist/esm/components/placement/PlacementResponseRenderer.css +0 -4
- package/dist/esm/components/placement/PlacementResponseRenderer.js +1 -16
- package/dist/esm/components/placement/PlacementResponseRenderer.js.map +1 -1
- package/dist/esm/components/placement/buildPlacementDependencies.js.map +1 -1
- package/dist/esm/components/ui/OptimizedImage.js +50 -5
- package/dist/esm/components/ui/OptimizedImage.js.map +1 -1
- package/dist/esm/components/ui/SectionSkeleton.css +19 -0
- package/dist/esm/components/ui/SectionSkeleton.js +5 -1
- package/dist/esm/components/ui/SectionSkeleton.js.map +1 -1
- package/dist/esm/components/ui/UserQuery.css +72 -0
- package/dist/esm/components/ui/UserQuery.js +52 -6
- package/dist/esm/components/ui/UserQuery.js.map +1 -1
- package/dist/esm/context/UserQueryContext.js +21 -0
- package/dist/esm/context/UserQueryContext.js.map +1 -0
- package/dist/esm/entity/defaultExtractor.js +9 -2
- package/dist/esm/entity/defaultExtractor.js.map +1 -1
- package/dist/esm/entity/fetchEntityListData.js +14 -26
- package/dist/esm/entity/fetchEntityListData.js.map +1 -1
- package/dist/esm/entity/index.js +1 -0
- package/dist/esm/entity/index.js.map +1 -1
- package/dist/esm/entity/listEntityItems.js +85 -0
- package/dist/esm/entity/listEntityItems.js.map +1 -0
- package/dist/esm/hostScope.js +59 -0
- package/dist/esm/hostScope.js.map +1 -0
- package/dist/esm/index.js +13 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/patternValidator/validator.test.js +61 -61
- package/dist/esm/patternValidator/validator.test.js.map +1 -1
- package/dist/esm/registry/ComponentRegistry.js +22 -2
- package/dist/esm/registry/ComponentRegistry.js.map +1 -1
- package/dist/esm/registry/index.js +0 -1
- package/dist/esm/registry/index.js.map +1 -1
- package/dist/esm/registry/types.js.map +1 -1
- package/dist/esm/styles/base-utilities.css +35 -0
- package/dist/esm/styles/components.css +1 -0
- package/dist/esm/styles/host-reset.css +81 -0
- package/dist/esm/styles/tailwind-theme.css +6 -6
- package/dist/esm/utils/backendEnvironment.js +71 -0
- package/dist/esm/utils/backendEnvironment.js.map +1 -0
- package/dist/esm/utils/entityLinkParser.js +3 -1
- package/dist/esm/utils/entityLinkParser.js.map +1 -1
- package/dist/esm/utils/imageBackdrop.js +262 -0
- package/dist/esm/utils/imageBackdrop.js.map +1 -0
- package/dist/esm/utils/intentExtractor.js +21 -12
- package/dist/esm/utils/intentExtractor.js.map +1 -1
- package/dist/esm/utils/productBackHandoff.js +100 -0
- package/dist/esm/utils/productBackHandoff.js.map +1 -0
- package/dist/esm/utils/refreshPrompts.js +67 -0
- package/dist/esm/utils/refreshPrompts.js.map +1 -0
- package/dist/types/component/componentDefinitions/HeroEntitySectionDefinition.d.ts.map +1 -1
- package/dist/types/component/componentDefinitions/HeroSectionDefinition.d.ts.map +1 -1
- package/dist/types/component/componentDefinitions/listItemsSectionDefinition.d.ts +2 -2
- package/dist/types/component/componentDefinitions/listItemsSectionDefinition.d.ts.map +1 -1
- package/dist/types/component/componentParser.d.ts.map +1 -1
- package/dist/types/component/types.d.ts +1 -5
- package/dist/types/component/types.d.ts.map +1 -1
- package/dist/types/components/placement/PlacementResponseRenderer.d.ts +1 -1
- package/dist/types/components/placement/PlacementResponseRenderer.d.ts.map +1 -1
- package/dist/types/components/placement/buildPlacementDependencies.d.ts +1 -2
- package/dist/types/components/placement/buildPlacementDependencies.d.ts.map +1 -1
- package/dist/types/components/ui/OptimizedImage.d.ts +9 -0
- package/dist/types/components/ui/OptimizedImage.d.ts.map +1 -1
- package/dist/types/components/ui/SectionSkeleton.d.ts.map +1 -1
- package/dist/types/components/ui/UserQuery.d.ts +21 -0
- package/dist/types/components/ui/UserQuery.d.ts.map +1 -1
- package/dist/types/context/UserQueryContext.d.ts +12 -0
- package/dist/types/context/UserQueryContext.d.ts.map +1 -0
- package/dist/types/entity/defaultExtractor.d.ts.map +1 -1
- package/dist/types/entity/fetchEntityListData.d.ts +0 -2
- package/dist/types/entity/fetchEntityListData.d.ts.map +1 -1
- package/dist/types/entity/index.d.ts +1 -0
- package/dist/types/entity/index.d.ts.map +1 -1
- package/dist/types/entity/listEntityItems.d.ts +40 -0
- package/dist/types/entity/listEntityItems.d.ts.map +1 -0
- package/dist/types/hostScope.d.ts +83 -0
- package/dist/types/hostScope.d.ts.map +1 -0
- package/dist/types/index.d.ts +11 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/registry/ComponentRegistry.d.ts +8 -0
- package/dist/types/registry/ComponentRegistry.d.ts.map +1 -1
- package/dist/types/registry/index.d.ts +0 -1
- package/dist/types/registry/index.d.ts.map +1 -1
- package/dist/types/registry/types.d.ts +5 -6
- package/dist/types/registry/types.d.ts.map +1 -1
- package/dist/types/utils/backendEnvironment.d.ts +30 -0
- package/dist/types/utils/backendEnvironment.d.ts.map +1 -0
- package/dist/types/utils/entityLinkParser.d.ts.map +1 -1
- package/dist/types/utils/imageBackdrop.d.ts +102 -0
- package/dist/types/utils/imageBackdrop.d.ts.map +1 -0
- package/dist/types/utils/intentExtractor.d.ts +21 -4
- package/dist/types/utils/intentExtractor.d.ts.map +1 -1
- package/dist/types/utils/productBackHandoff.d.ts +43 -0
- package/dist/types/utils/productBackHandoff.d.ts.map +1 -0
- package/dist/types/utils/refreshPrompts.d.ts +32 -0
- package/dist/types/utils/refreshPrompts.d.ts.map +1 -0
- package/package.json +2 -2
- package/src/components/placement/PlacementResponseRenderer.css +0 -4
- package/src/components/ui/SectionSkeleton.css +19 -0
- package/src/components/ui/UserQuery.css +72 -0
- package/src/styles/base-utilities.css +35 -0
- package/src/styles/components.css +1 -0
- package/src/styles/host-reset.css +81 -0
- package/src/styles/tailwind-theme.css +6 -6
- package/dist/cjs/registry/Intent.js +0 -19
- package/dist/cjs/registry/Intent.js.map +0 -1
- package/dist/cjs/utils/conversationApi.js +0 -52
- package/dist/cjs/utils/conversationApi.js.map +0 -1
- package/dist/cjs/utils/conversationMode.js +0 -23
- package/dist/cjs/utils/conversationMode.js.map +0 -1
- package/dist/esm/registry/Intent.js +0 -15
- package/dist/esm/registry/Intent.js.map +0 -1
- package/dist/esm/utils/conversationApi.js +0 -45
- package/dist/esm/utils/conversationApi.js.map +0 -1
- package/dist/esm/utils/conversationMode.js +0 -18
- package/dist/esm/utils/conversationMode.js.map +0 -1
- package/dist/types/registry/Intent.d.ts +0 -12
- package/dist/types/registry/Intent.d.ts.map +0 -1
- package/dist/types/utils/conversationApi.d.ts +0 -26
- package/dist/types/utils/conversationApi.d.ts.map +0 -1
- package/dist/types/utils/conversationMode.d.ts +0 -16
- package/dist/types/utils/conversationMode.d.ts.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["Intent"],"sources":["../../../src/registry/Intent.ts"],"sourcesContent":["export enum Intent {\n // New intent taxonomy\n COMPARISON = 'COMPARISON',\n DECISION = 'DECISION',\n VALIDATION = 'VALIDATION',\n STRATEGY = 'STRATEGY',\n EXPLORATION = 'EXPLORATION',\n INQUIRY = 'INQUIRY',\n // Legacy intents (still used in hero registrations and intentExtractor)\n DISCOVERY = 'DISCOVERY',\n LEARN = 'LEARN',\n EVALUATE = 'EVALUATE',\n}\n"],"mappings":"AAAA,WAAYA,MAAM,0BAANA,MAAM;EAChB;EADUA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAANA,MAAM;EAQhB;EARUA,MAAM;EAANA,MAAM;EAANA,MAAM;EAAA,OAANA,MAAM;AAAA","ignoreList":[]}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation API selection (debug-only).
|
|
3
|
-
*
|
|
4
|
-
* Switches the conversation between the default `Conversation` RPC
|
|
5
|
-
* (`POST /v1/conversation`) and the parallel-safe `Turn` RPC
|
|
6
|
-
* (`POST /v1/turn`, DL #110). Persisted in
|
|
7
|
-
* `localStorage["web5_conversation_api"]`, read at request time. Default
|
|
8
|
-
* `conversation` (Turn is opt-in via the debug toggle for now).
|
|
9
|
-
*
|
|
10
|
-
* `Turn` returns a flat markdown stream (no sectioned page frames), so the
|
|
11
|
-
* sectioned-stream consumption path only runs on the `Conversation` API. Lives
|
|
12
|
-
* in web5-core so any surface can honor the same toggle.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
export const CONVERSATION_API_KEY = 'web5_conversation_api';
|
|
16
|
-
export const DEFAULT_CONVERSATION_API = 'conversation';
|
|
17
|
-
|
|
18
|
-
/**
|
|
19
|
-
* Read the selected conversation API from localStorage. Falls back to the
|
|
20
|
-
* default (`conversation`) when unset, invalid, or storage is unavailable.
|
|
21
|
-
*/
|
|
22
|
-
export const getConversationApi = () => {
|
|
23
|
-
try {
|
|
24
|
-
const value = localStorage.getItem(CONVERSATION_API_KEY);
|
|
25
|
-
if (value === 'turn' || value === 'conversation') {
|
|
26
|
-
return value;
|
|
27
|
-
}
|
|
28
|
-
} catch {
|
|
29
|
-
// localStorage can throw in privacy mode / non-DOM environments.
|
|
30
|
-
}
|
|
31
|
-
return DEFAULT_CONVERSATION_API;
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/** Persist the selected conversation API to localStorage. */
|
|
35
|
-
export const setConversationApi = api => {
|
|
36
|
-
try {
|
|
37
|
-
localStorage.setItem(CONVERSATION_API_KEY, api);
|
|
38
|
-
} catch {
|
|
39
|
-
// Ignore — selection simply won't persist across reloads.
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
/** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */
|
|
44
|
-
export const usesTurnApi = () => getConversationApi() === 'turn';
|
|
45
|
-
//# sourceMappingURL=conversationApi.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CONVERSATION_API_KEY","DEFAULT_CONVERSATION_API","getConversationApi","value","localStorage","getItem","setConversationApi","api","setItem","usesTurnApi"],"sources":["../../../src/utils/conversationApi.ts"],"sourcesContent":["/**\n * Conversation API selection (debug-only).\n *\n * Switches the conversation between the default `Conversation` RPC\n * (`POST /v1/conversation`) and the parallel-safe `Turn` RPC\n * (`POST /v1/turn`, DL #110). Persisted in\n * `localStorage[\"web5_conversation_api\"]`, read at request time. Default\n * `conversation` (Turn is opt-in via the debug toggle for now).\n *\n * `Turn` returns a flat markdown stream (no sectioned page frames), so the\n * sectioned-stream consumption path only runs on the `Conversation` API. Lives\n * in web5-core so any surface can honor the same toggle.\n */\n\nexport type ConversationApiKind = 'turn' | 'conversation';\n\nexport const CONVERSATION_API_KEY = 'web5_conversation_api';\n\nexport const DEFAULT_CONVERSATION_API: ConversationApiKind = 'conversation';\n\n/**\n * Read the selected conversation API from localStorage. Falls back to the\n * default (`conversation`) when unset, invalid, or storage is unavailable.\n */\nexport const getConversationApi = (): ConversationApiKind => {\n try {\n const value = localStorage.getItem(CONVERSATION_API_KEY);\n if (value === 'turn' || value === 'conversation') {\n return value;\n }\n } catch {\n // localStorage can throw in privacy mode / non-DOM environments.\n }\n return DEFAULT_CONVERSATION_API;\n};\n\n/** Persist the selected conversation API to localStorage. */\nexport const setConversationApi = (api: ConversationApiKind): void => {\n try {\n localStorage.setItem(CONVERSATION_API_KEY, api);\n } catch {\n // Ignore — selection simply won't persist across reloads.\n }\n};\n\n/** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */\nexport const usesTurnApi = (): boolean => getConversationApi() === 'turn';\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAIA,OAAO,MAAMA,oBAAoB,GAAG,uBAAuB;AAE3D,OAAO,MAAMC,wBAA6C,GAAG,cAAc;;AAE3E;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAA2B;EAC3D,IAAI;IACF,MAAMC,KAAK,GAAGC,YAAY,CAACC,OAAO,CAACL,oBAAoB,CAAC;IACxD,IAAIG,KAAK,KAAK,MAAM,IAAIA,KAAK,KAAK,cAAc,EAAE;MAChD,OAAOA,KAAK;IACd;EACF,CAAC,CAAC,MAAM;IACN;EAAA;EAEF,OAAOF,wBAAwB;AACjC,CAAC;;AAED;AACA,OAAO,MAAMK,kBAAkB,GAAIC,GAAwB,IAAW;EACpE,IAAI;IACFH,YAAY,CAACI,OAAO,CAACR,oBAAoB,EAAEO,GAAG,CAAC;EACjD,CAAC,CAAC,MAAM;IACN;EAAA;AAEJ,CAAC;;AAED;AACA,OAAO,MAAME,WAAW,GAAGA,CAAA,KAAeP,kBAAkB,CAAC,CAAC,KAAK,MAAM","ignoreList":[]}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation wire mode.
|
|
3
|
-
*
|
|
4
|
-
* There is a single conversation engine: the page streams section-by-section
|
|
5
|
-
* (each markdown frame tagged with a numeric section `id` + `status`). The
|
|
6
|
-
* `additionalData.mode` sent on every `/conversation` request is fixed.
|
|
7
|
-
*
|
|
8
|
-
* A `?mode=` query param, when present, overrides this value and is sent to the
|
|
9
|
-
* backend verbatim (callers read the param themselves); the frontend always
|
|
10
|
-
* uses the sectioned-stream consumption path regardless.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
/** `additionalData.mode` sent on a `/conversation` request. */
|
|
14
|
-
export const CONVERSATION_MODE = 'markdown_history_v3';
|
|
15
|
-
|
|
16
|
-
/** Resolve the `additionalData.mode` to send on a `/conversation` request. */
|
|
17
|
-
export const resolveConversationMode = () => CONVERSATION_MODE;
|
|
18
|
-
//# sourceMappingURL=conversationMode.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["CONVERSATION_MODE","resolveConversationMode"],"sources":["../../../src/utils/conversationMode.ts"],"sourcesContent":["/**\n * Conversation wire mode.\n *\n * There is a single conversation engine: the page streams section-by-section\n * (each markdown frame tagged with a numeric section `id` + `status`). The\n * `additionalData.mode` sent on every `/conversation` request is fixed.\n *\n * A `?mode=` query param, when present, overrides this value and is sent to the\n * backend verbatim (callers read the param themselves); the frontend always\n * uses the sectioned-stream consumption path regardless.\n */\n\n/** `additionalData.mode` sent on a `/conversation` request. */\nexport const CONVERSATION_MODE = 'markdown_history_v3';\n\n/** Resolve the `additionalData.mode` to send on a `/conversation` request. */\nexport const resolveConversationMode = (): string => CONVERSATION_MODE;\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,OAAO,MAAMA,iBAAiB,GAAG,qBAAqB;;AAEtD;AACA,OAAO,MAAMC,uBAAuB,GAAGA,CAAA,KAAcD,iBAAiB","ignoreList":[]}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare enum Intent {
|
|
2
|
-
COMPARISON = "COMPARISON",
|
|
3
|
-
DECISION = "DECISION",
|
|
4
|
-
VALIDATION = "VALIDATION",
|
|
5
|
-
STRATEGY = "STRATEGY",
|
|
6
|
-
EXPLORATION = "EXPLORATION",
|
|
7
|
-
INQUIRY = "INQUIRY",
|
|
8
|
-
DISCOVERY = "DISCOVERY",
|
|
9
|
-
LEARN = "LEARN",
|
|
10
|
-
EVALUATE = "EVALUATE"
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=Intent.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Intent.d.ts","sourceRoot":"","sources":["../../../src/registry/Intent.ts"],"names":[],"mappings":"AAAA,oBAAY,MAAM;IAEhB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,UAAU,eAAe;IACzB,QAAQ,aAAa;IACrB,WAAW,gBAAgB;IAC3B,OAAO,YAAY;IAEnB,SAAS,cAAc;IACvB,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB"}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation API selection (debug-only).
|
|
3
|
-
*
|
|
4
|
-
* Switches the conversation between the default `Conversation` RPC
|
|
5
|
-
* (`POST /v1/conversation`) and the parallel-safe `Turn` RPC
|
|
6
|
-
* (`POST /v1/turn`, DL #110). Persisted in
|
|
7
|
-
* `localStorage["web5_conversation_api"]`, read at request time. Default
|
|
8
|
-
* `conversation` (Turn is opt-in via the debug toggle for now).
|
|
9
|
-
*
|
|
10
|
-
* `Turn` returns a flat markdown stream (no sectioned page frames), so the
|
|
11
|
-
* sectioned-stream consumption path only runs on the `Conversation` API. Lives
|
|
12
|
-
* in web5-core so any surface can honor the same toggle.
|
|
13
|
-
*/
|
|
14
|
-
export type ConversationApiKind = 'turn' | 'conversation';
|
|
15
|
-
export declare const CONVERSATION_API_KEY = "web5_conversation_api";
|
|
16
|
-
export declare const DEFAULT_CONVERSATION_API: ConversationApiKind;
|
|
17
|
-
/**
|
|
18
|
-
* Read the selected conversation API from localStorage. Falls back to the
|
|
19
|
-
* default (`conversation`) when unset, invalid, or storage is unavailable.
|
|
20
|
-
*/
|
|
21
|
-
export declare const getConversationApi: () => ConversationApiKind;
|
|
22
|
-
/** Persist the selected conversation API to localStorage. */
|
|
23
|
-
export declare const setConversationApi: (api: ConversationApiKind) => void;
|
|
24
|
-
/** Whether the conversation should use the Turn RPC (opt-in; default is Conversation). */
|
|
25
|
-
export declare const usesTurnApi: () => boolean;
|
|
26
|
-
//# sourceMappingURL=conversationApi.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversationApi.d.ts","sourceRoot":"","sources":["../../../src/utils/conversationApi.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,MAAM,MAAM,mBAAmB,GAAG,MAAM,GAAG,cAAc,CAAC;AAE1D,eAAO,MAAM,oBAAoB,0BAA0B,CAAC;AAE5D,eAAO,MAAM,wBAAwB,EAAE,mBAAoC,CAAC;AAE5E;;;GAGG;AACH,eAAO,MAAM,kBAAkB,QAAO,mBAUrC,CAAC;AAEF,6DAA6D;AAC7D,eAAO,MAAM,kBAAkB,QAAS,mBAAmB,KAAG,IAM7D,CAAC;AAEF,0FAA0F;AAC1F,eAAO,MAAM,WAAW,QAAO,OAA0C,CAAC"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Conversation wire mode.
|
|
3
|
-
*
|
|
4
|
-
* There is a single conversation engine: the page streams section-by-section
|
|
5
|
-
* (each markdown frame tagged with a numeric section `id` + `status`). The
|
|
6
|
-
* `additionalData.mode` sent on every `/conversation` request is fixed.
|
|
7
|
-
*
|
|
8
|
-
* A `?mode=` query param, when present, overrides this value and is sent to the
|
|
9
|
-
* backend verbatim (callers read the param themselves); the frontend always
|
|
10
|
-
* uses the sectioned-stream consumption path regardless.
|
|
11
|
-
*/
|
|
12
|
-
/** `additionalData.mode` sent on a `/conversation` request. */
|
|
13
|
-
export declare const CONVERSATION_MODE = "markdown_history_v3";
|
|
14
|
-
/** Resolve the `additionalData.mode` to send on a `/conversation` request. */
|
|
15
|
-
export declare const resolveConversationMode: () => string;
|
|
16
|
-
//# sourceMappingURL=conversationMode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"conversationMode.d.ts","sourceRoot":"","sources":["../../../src/utils/conversationMode.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,+DAA+D;AAC/D,eAAO,MAAM,iBAAiB,wBAAwB,CAAC;AAEvD,8EAA8E;AAC9E,eAAO,MAAM,uBAAuB,QAAO,MAA2B,CAAC"}
|