diff --git a/src/components/Header.vue b/src/components/Header.vue index 0fe4ca4..e4cf21a 100644 --- a/src/components/Header.vue +++ b/src/components/Header.vue @@ -1,4 +1,18 @@ - + @@ -21,16 +35,16 @@ - + Home - + Memory - + Plugins - + Settings @@ -47,16 +61,16 @@ - + Home - + Memory - + Plugins - + Settings diff --git a/src/views/EmbeddersView.vue b/src/views/EmbeddersView.vue index 90085ee..d2ffb31 100644 --- a/src/views/EmbeddersView.vue +++ b/src/views/EmbeddersView.vue @@ -5,7 +5,7 @@ import { useEmbedderConfig } from '@stores/useEmbedderConfig' const storeEmbedder = useEmbedderConfig() const { getEmbedderSchema, getEmbedderSettings, setEmbedderSettings, refreshSettings } = storeEmbedder const { currentState: embedderState, getAvailableEmbedders } = storeToRefs(storeEmbedder) - +const { cannot } = usePerms() const selectedEmbedder = ref(embedderState.value.selected) const currentSchema = ref() const currentSettings = ref({}) @@ -52,6 +52,7 @@ watchDeep( updateProperties(e.value)" /> diff --git a/src/views/HomeView.vue b/src/views/HomeView.vue index bbcf2a0..70a94bf 100644 --- a/src/views/HomeView.vue +++ b/src/views/HomeView.vue @@ -9,7 +9,7 @@ const route = useRoute() const messagesStore = useMessages() const { dispatchMessage, selectRandomDefaultMessages } = messagesStore const { currentState: messagesState } = storeToRefs(messagesStore) - +const { can, cannot } = usePerms() const userMessage = ref(''), insertedURL = ref(''), isScrollable = ref(false), @@ -33,7 +33,7 @@ const { currentState: rabbitHoleState } = storeToRefs(useRabbitHole()) const { wipeConversation } = useMemory() const inputDisabled = computed(() => { - return messagesState.value.loading || !messagesState.value.ready || Boolean(messagesState.value.error) + return messagesState.value.loading || !messagesState.value.ready || Boolean(messagesState.value.error) || cannot('WRITE', 'CONVERSATION') }) const randomDefaultMessages = selectRandomDefaultMessages() @@ -227,7 +227,7 @@ const scrollToBottom = () => { - + { {{ msg }} + diff --git a/src/views/MemoryView.vue b/src/views/MemoryView.vue index 88a6dfe..245683f 100644 --- a/src/views/MemoryView.vue +++ b/src/views/MemoryView.vue @@ -12,7 +12,7 @@ import type { VectorsData } from 'ccat-api' import type { MarkerData, PlotData } from '@models/Plot' const { isDark } = storeToRefs(useSettings()) - +const { cannot } = usePerms() const callText = ref(''), callOutput = ref(), kMems = ref(10) @@ -192,7 +192,7 @@ const wipeMemory = async () => { placeholder="Enter a text..." label="Search similar memories" search - :disabled="Boolean(memoryState.error) || memoryState.loading" + :disabled="Boolean(memoryState.error) || memoryState.loading || cannot('READ', 'MEMORY')" @send="recallMemory()" /> @@ -359,7 +359,7 @@ const wipeMemory = async () => { @@ -406,6 +406,7 @@ const wipeMemory = async () => { Delete memory point diff --git a/src/views/PluginsView.vue b/src/views/PluginsView.vue index fb68ec1..bf66212 100644 --- a/src/views/PluginsView.vue +++ b/src/views/PluginsView.vue @@ -11,7 +11,7 @@ import { type SchemaField, type JSONSettings } from '@models/JSONSchema' const store = usePlugins() const { togglePlugin, removePlugin, updateSettings, getSchema, getSettings, searchPlugin, installRegistryPlugin } = store const { currentState: pluginsState } = storeToRefs(store) - +const { can, cannot } = usePerms() const { pluginsFilters } = storeToRefs(useSettings()) const { upload: uploadFile } = uploadContent() @@ -122,7 +122,7 @@ watchEffect(() => { Create plugin @@ -131,7 +131,7 @@ watchEffect(() => { - + @@ -160,17 +160,23 @@ watchEffect(() => { Upgrade - + Install Delete @@ -198,12 +204,14 @@ watchEffect(() => { @@ -212,6 +220,7 @@ watchEffect(() => { v-model="item.active" type="checkbox" class="!toggle !toggle-primary" + :disabled="cannot('WRITE', 'PLUGINS')" @click=" async () => { // TODO: Fix this workaround used to prevent checkbox switching when an error occurs diff --git a/src/views/ProvidersView.vue b/src/views/ProvidersView.vue index ebc6ec3..6de8972 100644 --- a/src/views/ProvidersView.vue +++ b/src/views/ProvidersView.vue @@ -5,7 +5,7 @@ import { useLLMConfig } from '@stores/useLLMConfig' const storeLLM = useLLMConfig() const { getProviderSchema, setProviderSettings, getProviderSettings, refreshSettings } = storeLLM const { currentState: llmState, getAvailableProviders } = storeToRefs(storeLLM) - +const { cannot } = usePerms() const selectedProvider = ref(llmState.value.selected) const currentSchema = ref() const currentSettings = ref({}) @@ -48,6 +48,7 @@ watchDeep( updateProperties(e.value)" /> diff --git a/src/views/SettingsView.vue b/src/views/SettingsView.vue index b9ffca1..b1dfe0e 100644 --- a/src/views/SettingsView.vue +++ b/src/views/SettingsView.vue @@ -48,23 +48,36 @@ const canSave = computed(() => { - + Cheshire Cat AI - Version {{ cat ? cat.version : 'unknown' }} + {{ cat.status }} Large Language Model Choose and configure your favourite LLM from a list of supported providers - Configure + + Configure + Embedder Choose a language embedder to help the Cat remember conversations and documents - Configure + + Configure +
Cheshire Cat AI - Version {{ cat ? cat.version : 'unknown' }}
Large Language Model
Choose and configure your favourite LLM from a list of supported providers
Embedder
Choose a language embedder to help the Cat remember conversations and documents