From 31dc740554b564373c9c3976c1fde90f88fb769e Mon Sep 17 00:00:00 2001 From: Rafi Date: Wed, 19 Apr 2023 16:52:41 +0800 Subject: [PATCH] feat(editor): Encapsulate the tools in the editor toolbar as independent components. --- components/Conversation.vue | 58 +++++---------------------- components/editorTools/FrugalMode.vue | 53 ++++++++++++++++++++++++ components/editorTools/WebSearch.vue | 53 ++++++++++++++++++++++++ composables/states.js | 6 ++- 4 files changed, 120 insertions(+), 50 deletions(-) create mode 100644 components/editorTools/FrugalMode.vue create mode 100644 components/editorTools/WebSearch.vue diff --git a/components/Conversation.vue b/components/Conversation.vue index 758e2dc..adc8271 100644 --- a/components/Conversation.vue +++ b/components/Conversation.vue @@ -1,5 +1,6 @@ + + + + \ No newline at end of file diff --git a/components/editorTools/WebSearch.vue b/components/editorTools/WebSearch.vue new file mode 100644 index 0000000..010a77c --- /dev/null +++ b/components/editorTools/WebSearch.vue @@ -0,0 +1,53 @@ + + + + + \ No newline at end of file diff --git a/composables/states.js b/composables/states.js index fd6d8cd..c776b69 100644 --- a/composables/states.js +++ b/composables/states.js @@ -9,4 +9,8 @@ export const useConversations = () => useState('conversations', () => []) export const useUser = () => useState('user', () => null) -export const useDrawer = () => useState('drawer', () => false) \ No newline at end of file +export const useDrawer = () => useState('drawer', () => false) + +export const useEnableWebSearch = () => useState('enableWebSearch', () => false) + +export const useFrugalMode = () => useState('frugalMode', () => false) \ No newline at end of file