refactor: comment out AI chat features in NormalLayout.vue for future implementation

This commit is contained in:
Marvin Zhang
2025-09-12 15:01:29 +08:00
parent b5f10cb6a8
commit 05a71da26e

View File

@@ -6,29 +6,31 @@ const store = useStore();
const { layout: state } = store.state as RootStoreState; const { layout: state } = store.state as RootStoreState;
const sidebarCollapsed = computed<boolean>(() => state.sidebarCollapsed); const sidebarCollapsed = computed<boolean>(() => state.sidebarCollapsed);
const chatSidebarVisible = computed<boolean>(() => state.chatbotSidebarVisible); // Temporarily commented out - AI chat features are WIP
const chatSidebarWidth = computed<number>(() => state.chatbotSidebarWidth); // const chatSidebarVisible = computed<boolean>(() => state.chatbotSidebarVisible);
// const chatSidebarWidth = computed<number>(() => state.chatbotSidebarWidth);
const closeChatSidebar = () => { // const closeChatSidebar = () => {
store.commit('layout/setChatbotSidebarVisible', false); // store.commit('layout/setChatbotSidebarVisible', false);
}; // };
const resizeChatSidebar = (width: number) => { // const resizeChatSidebar = (width: number) => {
store.commit('layout/setChatbotSidebarWidth', width); // store.commit('layout/setChatbotSidebarWidth', width);
}; // };
const chatSidebarResizing = ref(false); // const chatSidebarResizing = ref(false);
// Make sure the chatbotSidebarWidth is initialized from localStorage // Make sure the chatbotSidebarWidth is initialized from localStorage
onBeforeMount(() => { onBeforeMount(() => {
store.dispatch('common/getMe'); store.dispatch('common/getMe');
// Ensure sidebar width is initialized from localStorage // Temporarily commented out - AI chat features are WIP
const storedWidth = localStorage.getItem('chatbotSidebarWidth'); // // Ensure sidebar width is initialized from localStorage
if (storedWidth) { // const storedWidth = localStorage.getItem('chatbotSidebarWidth');
const width = parseInt(storedWidth); // if (storedWidth) {
store.commit('layout/setChatbotSidebarWidth', width); // const width = parseInt(storedWidth);
} // store.commit('layout/setChatbotSidebarWidth', width);
// }
}); });
defineOptions({ name: 'ClNormalLayout' }); defineOptions({ name: 'ClNormalLayout' });
@@ -40,10 +42,8 @@ defineOptions({ name: 'ClNormalLayout' });
<div <div
:class="[ :class="[
sidebarCollapsed ? 'collapsed' : '', sidebarCollapsed ? 'collapsed' : '',
chatSidebarResizing ? 'chat-resizing' : '',
]" ]"
class="main-content" class="main-content"
:style="chatSidebarVisible ? { right: `${chatSidebarWidth}px` } : {}"
> >
<cl-header /> <cl-header />
<cl-tabs-view /> <cl-tabs-view />
@@ -51,6 +51,8 @@ defineOptions({ name: 'ClNormalLayout' });
<router-view /> <router-view />
</div> </div>
</div> </div>
<!-- Temporarily commented out - AI chat features are WIP -->
<!--
<cl-chat-sidebar <cl-chat-sidebar
:visible="chatSidebarVisible" :visible="chatSidebarVisible"
:default-width="chatSidebarWidth" :default-width="chatSidebarWidth"
@@ -64,6 +66,7 @@ defineOptions({ name: 'ClNormalLayout' });
@close="closeChatSidebar" @close="closeChatSidebar"
/> />
</cl-chat-sidebar> </cl-chat-sidebar>
-->
</div> </div>
</template> </template>