Skip to content

Commit 9172def

Browse files
committed
feature(shopify): add the ability to set the icon for the chat
1 parent 134d9c5 commit 9172def

3 files changed

Lines changed: 9 additions & 2 deletions

File tree

clients/trieve-shopify-extension/app/auth.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,6 @@ export const validateTrieveAuth = async <S extends boolean = true>(
206206
});
207207
}
208208

209-
console.log("updating dataset id for shop", key);
210209
if (key.currentDatasetId && key.key && session) {
211210
setAppMetafields(fetcher, {
212211
id: key.id,

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
zIndex: Number(getValue(appMetafieldTrieve.z_index, 2147483645)),
4343
defaultAiQuestions,
4444
brandColor: getValue("{{ block.settings.brand_color }}", ""),
45+
brandLogoImgSrcUrl: getValue("{{ block.settings.brand_logo_img_src_url }}", undefined),
4546
chatPlaceholder: getValue("{{ block.settings.chat_placeholder }}", "Ask anything..."),
4647
suggestedQueries: toBool(getValue("{{ block.settings.suggested_queries }}", true)),
4748
followupQuestions: toBool(getValue("{{ block.settings.suggested_queries }}", true)),
@@ -129,6 +130,12 @@
129130
"label": "Brand Color",
130131
"default": "#ff0000"
131132
},
133+
{
134+
"type": "text",
135+
"id": "brand_logo_img_src_url",
136+
"label": "Brand Logo Image URL",
137+
"placeholder": "https://cdn.trieve.ai/trieve-logo.png"
138+
},
132139
{
133140
"type": "text",
134141
"id": "chat_placeholder",

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@
4646
datasetId: appMetafieldTrieve.dataset_id,
4747
zIndex: Number(getValue(appMetafieldTrieve.z_index, 2147483645)),
4848
defaultAiQuestions,
49-
brandColor: getValue("{{ block.settings.brand_color }}", ""),
49+
brandColor: getValue("{{ block.settings.brand_color }}", "#ff0000"),
50+
brandLogoImgSrcUrl: getValue("{{ block.settings.brand_logo_img_src_url }}", undefined),
5051
chatPlaceholder: getValue("{{ block.settings.chat_placeholder }}", "Ask anything..."),
5152
suggestedQueries: toBool(getValue("{{ block.settings.suggested_queries }}", true)),
5253
followupQuestions: toBool(getValue("{{ block.settings.suggested_queries }}", true)),

0 commit comments

Comments
 (0)