Skip to content

Commit 4732c8e

Browse files
committed
feat(search-component): add showTrieve for controlling display of powered by in footer + cleanup(shopify): remove outdated scaleRem + cleanup(shopify): improveconsistency of view for dashboard.chatView component
1 parent 8e11451 commit 4732c8e

File tree

9 files changed

+40
-24
lines changed

9 files changed

+40
-24
lines changed

clients/search-component/src/TrieveModal/ModalContainer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export const ModalContainer = () => {
4545
</Suspense>
4646
{mode === "chat" && !fullscreenPdfState && <ChatMode />}
4747
{fullscreenPdfState && <PdfViewer {...fullscreenPdfState} />}
48-
<Footer />
48+
{(props.showTrieve ?? true) && <Footer />}
4949
</div>
5050
);
5151
}, [props, mode, open, fullscreenPdfState, componentClass]);

clients/search-component/src/utils/hooks/modal-context.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ export type ModalProps = {
152152
hideOpenButton?: boolean;
153153
defaultImageQuestion?: string;
154154
onAddToCart?: (chunk: Chunk) => Promise<void> | void;
155+
showTrieve?: boolean;
155156
getCartQuantity?: (trackingId: string) => Promise<number> | number;
156157
showResultHighlights?: boolean;
157158
initialAiMessage?: string;

clients/trieve-shopify-extension/app/routes/app._dashboard.chatview.$topic.tsx

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,22 +126,39 @@ export default function ChatRoute() {
126126
<Suspense fallback={null}>
127127
{typeof window !== "undefined" && (
128128
<TrieveModalSearch
129-
baseUrl={trieve.trieve.baseUrl}
130129
type="ecommerce"
130+
baseUrl={trieve.trieve.baseUrl}
131+
cssRelease="beta"
132+
useGroupSearch={true}
133+
hideOpenButton={true}
131134
defaultSearchMode="chat"
132-
allowSwitchingModes={false}
133135
apiKey={trieveKey.key}
136+
datasetId={dataset.id}
137+
// skip zIndex
138+
// skip defaultAiQuestions
139+
brandColor="#ae715e" // TODO: get this from the settings
140+
brandLogoImgSrcUrl="https://cdn.trieve.ai/trieve-logo.png" // TODO: brandLogoImgSrcUrl from settings
141+
// skip chatPlaceholder
142+
// skip suggestedQueries
143+
// skip followQuestions
144+
// skip numberOfSuggestions
145+
openLinksInNewTab={true}
146+
// TODO: get theme from settings
147+
showTrieve={false}
148+
// skip geCartQuantity
149+
// skip searchOptions
150+
// skip chatFilters
151+
// defaultCurrency TODO: get this from settings
152+
// ---
153+
// BELOW ARE UNIQUE TO THE ANALYTICS CHAT VIEW
154+
allowSwitchingModes={false}
134155
previewTopicId={topicId}
135156
inlineCarousel={true}
136-
datasetId={dataset.id}
137157
inline={true}
138158
debounceMs={10}
139159
analytics={false}
140-
brandColor="#ae715e"
141-
brandLogoImgSrcUrl="https://cdn.trieve.ai/component/flaviar/Uncle%20Flaviar.svg"
142160
hidePrice={true}
143161
hideChunkHtml={true}
144-
useGroupSearch={true}
145162
/>
146163
)}
147164
</Suspense>

clients/trieve-shopify-extension/extensions/global-search/blocks/global_component.liquid

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@
4141
baseUrl: "https://api.trieve.ai",
4242
cssRelease: "beta",
4343
useGroupSearch: true,
44-
scaleRem: true,
4544
hideOpenButton: true,
4645
defaultSearchMode: "chat",
4746
apiKey: appMetafieldTrieve.api_key,

clients/trieve-shopify-extension/extensions/global-search/blocks/inline_component.liquid

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
baseUrl: "https://api.trieve.ai",
5454
cssRelease: "beta",
5555
useGroupSearch: false,
56-
scaleRem: true,
5756
hideOpenButton: true,
5857
defaultSearchMode: "chat",
5958
apiKey: appMetafieldTrieve.api_key,

clients/trieve-shopify-extension/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"react-dom": "^18.2.0",
5656
"tailwind-merge": "^3.1.0",
5757
"tailwindcss": "^3.4.17",
58-
"trieve-search-component": "0.4.55",
58+
"trieve-search-component": "0.4.64",
5959
"trieve-ts-sdk": "^0.0.89",
6060
"vite-tsconfig-paths": "^5.0.1"
6161
},

clients/trieve-shopify-extension/yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9346,10 +9346,10 @@ tr46@~0.0.3:
93469346
resolved "https://registry.yarnpkg.com/tr46/-/tr46-0.0.3.tgz#8184fd347dac9cdc185992f3a6622e14b9d9ab6a"
93479347
integrity sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==
93489348

9349-
trieve-search-component@0.4.55:
9350-
version "0.4.55"
9351-
resolved "https://registry.yarnpkg.com/trieve-search-component/-/trieve-search-component-0.4.55.tgz#7267b346412cbec129262e7c72848d3bf80b8a61"
9352-
integrity sha512-twYUpGIFoxiUWDOgVeOuMDOB+xlPr09AfCZZka7kmwccNtlTBMFZnmzs2RnyXirYmCeB/r0UgqEEIyYkpANkMg==
9349+
trieve-search-component@0.4.64:
9350+
version "0.4.64"
9351+
resolved "https://registry.yarnpkg.com/trieve-search-component/-/trieve-search-component-0.4.64.tgz#4785d6b38d57e196c26880a9e31c48b4fcdbb0c4"
9352+
integrity sha512-5I2TIRCZaqalfNRBE+fTBxxaDI8cZU/T0I4lHFTh19lJ9ny2+nIOFD6kXdH9s7zAUnt2Uyapcm1J+12G7QYi8Q==
93539353
dependencies:
93549354
"@formkit/auto-animate" "^0.8.2"
93559355
"@r2wc/react-to-web-component" "^2.0.3"
@@ -9365,18 +9365,18 @@ trieve-search-component@0.4.55:
93659365
react-scan "^0.3.2"
93669366
react-snap-carousel "^0.5.0"
93679367
tailwind-merge "^3.0.2"
9368-
trieve-ts-sdk "0.0.73"
9369-
9370-
trieve-ts-sdk@0.0.73:
9371-
version "0.0.73"
9372-
resolved "https://registry.yarnpkg.com/trieve-ts-sdk/-/trieve-ts-sdk-0.0.73.tgz#9de17428ddb4b1f6d68709695f371d185c4bda79"
9373-
integrity sha512-68iG/OlmKSGmnmI/J33S6VKleEAfq4txzARhvKv1g+CYSaG7HOH76n0cFDMtUUEEKn1PD4nV82uh5ZFtfIxD0A==
9368+
trieve-ts-sdk "^0.0.90"
93749369

93759370
trieve-ts-sdk@^0.0.89:
93769371
version "0.0.89"
93779372
resolved "https://registry.yarnpkg.com/trieve-ts-sdk/-/trieve-ts-sdk-0.0.89.tgz#d3128840b2e1fdadbc2a860e0ca53654d1da4d69"
93789373
integrity sha512-32GRoIbzEJCmHsqp3hWkpuaB16lpnQISXLMWLjfEGI6q5qUyGWsEGRJXkZsQokTSZuLlsDKcKu0IKWjXkdfWYQ==
93799374

9375+
trieve-ts-sdk@^0.0.90:
9376+
version "0.0.90"
9377+
resolved "https://registry.yarnpkg.com/trieve-ts-sdk/-/trieve-ts-sdk-0.0.90.tgz#6e4defaa59cb421ca83c0625408f8ed5fca242d4"
9378+
integrity sha512-dy7Z1cwVuo4loKrEKTOXZFAV5Lkw8vf1bFGX0yTPG9RmXSw4F6ipEup2FoKRHb0WXY8aIOX3B/dnxnlb0pMjSw==
9379+
93809380
trim-lines@^3.0.0:
93819381
version "3.0.1"
93829382
resolved "https://registry.yarnpkg.com/trim-lines/-/trim-lines-3.0.1.tgz#d802e332a07df861c48802c04321017b1bd87338"

clients/ts-sdk/openapi.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11372,7 +11372,7 @@
1137211372
},
1137311373
"currency": {
1137411374
"type": "string",
11375-
"description": "The currency to use for the completion. If not specified, this defaults to \"USD\".",
11375+
"description": "The currency symbol to use for the completion. If not specified, this defaults to \"$\".",
1137611376
"nullable": true
1137711377
},
1137811378
"filters": {
@@ -17088,7 +17088,7 @@
1708817088
},
1708917089
"currency": {
1709017090
"type": "string",
17091-
"description": "The currency to use for the completion. If not specified, this defaults to \"USD\".",
17091+
"description": "The currency symbol to use for the completion. If not specified, this defaults to \"$\".",
1709217092
"nullable": true
1709317093
},
1709417094
"filters": {

clients/ts-sdk/src/types.gen.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1395,7 +1395,7 @@ export type EditMessageReqPayload = {
13951395
concat_user_messages_query?: (boolean) | null;
13961396
context_options?: ((ContextOptions) | null);
13971397
/**
1398-
* The currency to use for the completion. If not specified, this defaults to "USD".
1398+
* The currency symbol to use for the completion. If not specified, this defaults to "$".
13991399
*/
14001400
currency?: (string) | null;
14011401
filters?: ((ChunkFilter) | null);
@@ -3218,7 +3218,7 @@ export type RegenerateMessageReqPayload = {
32183218
concat_user_messages_query?: (boolean) | null;
32193219
context_options?: ((ContextOptions) | null);
32203220
/**
3221-
* The currency to use for the completion. If not specified, this defaults to "USD".
3221+
* The currency symbol to use for the completion. If not specified, this defaults to "$".
32223222
*/
32233223
currency?: (string) | null;
32243224
filters?: ((ChunkFilter) | null);

0 commit comments

Comments
 (0)