File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<script lang =" ts" >
2+ import { onDestroy } from " svelte" ;
23 import { featureFlags } from " ../feature-flags" ;
34 import SidebarChat from " ./layouts/sidebar/SidebarChat.svelte" ;
45 import { chatOpen } from " ./layouts/sidebar/sidebar-store" ;
5-
66 import { developerChatConfig } from " @rilldata/web-common/features/editor/chat-utils.ts" ;
77 import { ConversationManager } from " @rilldata/web-common/features/chat/core/conversation-manager.ts" ;
88 import { maybeNavigateToGeneratedFile } from " @rilldata/web-common/features/sample-data/generate-sample-data.ts" ;
1515 navigationUnsub ?.();
1616 navigationUnsub = maybeNavigateToGeneratedFile (conversationManager );
1717 }
18+
19+ onDestroy (() => navigationUnsub ?.());
1820 </script >
1921
2022{#if $developerChat && $chatOpen }
Original file line number Diff line number Diff line change 5555 });
5656 </script >
5757
58- {#if conversationManager }
59- <div
60- class =" chat-sidebar"
61- style ="--sidebar-width: {$sidebarWidth }px;"
62- on:click |stopPropagation
63- role =" presentation"
64- >
65- <Resizer
66- min ={SIDEBAR_DEFAULTS .MIN_SIDEBAR_WIDTH }
67- max ={SIDEBAR_DEFAULTS .MAX_SIDEBAR_WIDTH }
68- basis ={SIDEBAR_DEFAULTS .SIDEBAR_WIDTH }
69- dimension ={$sidebarWidth }
70- direction =" EW"
71- side =" left"
72- onUpdate ={sidebarActions .updateSidebarWidth }
73- />
74- <div class =" chat-sidebar-content" >
75- <div class =" chatbot-header-container" >
76- <SidebarHeader
77- {conversationManager }
78- {onNewConversation }
79- onClose ={sidebarActions .closeChat }
80- />
81- </div >
82- <Messages {conversationManager } layout ="sidebar" {config } />
83- <ChatInput
58+ <div
59+ class =" chat-sidebar"
60+ style ="--sidebar-width: {$sidebarWidth }px;"
61+ on:click |stopPropagation
62+ role =" presentation"
63+ >
64+ <Resizer
65+ min ={SIDEBAR_DEFAULTS .MIN_SIDEBAR_WIDTH }
66+ max ={SIDEBAR_DEFAULTS .MAX_SIDEBAR_WIDTH }
67+ basis ={SIDEBAR_DEFAULTS .SIDEBAR_WIDTH }
68+ dimension ={$sidebarWidth }
69+ direction =" EW"
70+ side =" left"
71+ onUpdate ={sidebarActions .updateSidebarWidth }
72+ />
73+ <div class =" chat-sidebar-content" >
74+ <div class =" chatbot-header-container" >
75+ <SidebarHeader
8476 {conversationManager }
85- bind:this ={chatInputComponent }
86- onSend ={onMessageSend }
87- {config }
77+ {onNewConversation }
78+ onClose ={sidebarActions .closeChat }
8879 />
8980 </div >
81+ <Messages {conversationManager } layout ="sidebar" {config } />
82+ <ChatInput
83+ {conversationManager }
84+ bind:this ={chatInputComponent }
85+ onSend ={onMessageSend }
86+ {config }
87+ />
9088 </div >
91- { /if }
89+ </ div >
9290
9391<style lang =" postcss" >
9492 .chat-sidebar {
Original file line number Diff line number Diff line change @@ -13,7 +13,7 @@ import SnowflakeIcon from "../../components/icons/connectors/SnowflakeIcon.svelt
1313import ClickHouseCloudIcon from "../../components/icons/connectors/ClickHouseCloudIcon.svelte" ;
1414import StarRocksIcon from "../../components/icons/connectors/StarRocksIcon.svelte" ;
1515
16- export const ConnectorIconMapping = {
16+ export const connectorIconMapping = {
1717 athena : AthenaIcon ,
1818 bigquery : GoogleBigQueryIcon ,
1919 clickhouse : ClickHouseIcon ,
@@ -30,7 +30,7 @@ export const ConnectorIconMapping = {
3030 starrocks : StarRocksIcon ,
3131} ;
3232
33- export const ConnectorLabelMapping = {
33+ export const connectorLabelMapping = {
3434 duckdb : "DuckDB" ,
3535 clickhouse : "ClickHouse" ,
3636} ;
Original file line number Diff line number Diff line change 77 } from " ../../../runtime-client" ;
88 import { runtime } from " ../../../runtime-client/runtime-store" ;
99 import type { ConnectorExplorerStore } from " ./connector-explorer-store" ;
10- import { ConnectorIconMapping } from " ../connector-icon-mapping" ;
10+ import { connectorIconMapping } from " ../connector-icon-mapping" ;
1111 import { getConnectorIconKey } from " ../connectors-utils" ;
1212 import DatabaseExplorer from " ./DatabaseExplorer.svelte" ;
1313
5252 <span class =" flex-none" >
5353 {#if connector .driver ?.name }
5454 <svelte:component
55- this ={ConnectorIconMapping [getConnectorIconKey (connector )]}
55+ this ={connectorIconMapping [getConnectorIconKey (connector )]}
5656 size =" 16px"
5757 />
5858 {/if }
You can’t perform that action at this time.
0 commit comments