Skip to content

Commit

Permalink
Added support for the alias in and updated import paths.
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterBlenessy committed Jan 3, 2025
1 parent cbde672 commit d40174d
Show file tree
Hide file tree
Showing 26 changed files with 91 additions and 85 deletions.
26 changes: 13 additions & 13 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,24 +82,24 @@

<script>
import { computed, onBeforeMount, onMounted, ref, watch } from 'vue';
import SettingsDialog from "./components/Settings/SettingsDialog.vue";
import QuickSettings from "./components/Settings/QuickSettings.vue";
import UserInput from "./components/UserInput.vue";
import Messages from "./components/Messages.vue";
import OpenAI from './components/OpenAI.vue';
import History from './components/History.vue';
import Information from './components/Information.vue';
import Personas from './components/Personas.vue';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { storeToRefs } from 'pinia';
import { useSettingsStore } from './stores/settings-store.js';
import { useTeamsStore } from './stores/teams-store.js';
import { check } from '@tauri-apps/plugin-updater'
import { relaunch } from '@tauri-apps/plugin-process';
import DatabaseUpgrader from './services/databaseUpgrader.js';
import logger from './services/logger';
import iCloudService from './services/iCloudService';
import SettingsDialog from "@/components/Settings/SettingsDialog.vue";
import QuickSettings from "@/components/Settings/QuickSettings.vue";
import UserInput from "@/components/UserInput.vue";
import Messages from "@/components/Messages.vue";
import OpenAI from '@/components/OpenAI.vue';
import History from '@/components/History.vue';
import Information from '@/components/Information.vue';
import Personas from '@/components/Personas.vue';
import { useSettingsStore } from '@/stores/settings-store.js';
import { useTeamsStore } from '@/stores/teams-store.js';
import DatabaseUpgrader from '@/services/databaseUpgrader.js';
import logger from '@/services/logger';
import iCloudService from '@/services/iCloudService';
// This starter template is using Vue 3 <script setup> SFCs
// Check out https://vuejs.org/api/sfc-script-setup.html#script-setup
Expand Down
4 changes: 2 additions & 2 deletions src/components/History.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,12 +81,12 @@

<script>
import { useTeamsStore } from '../stores/teams-store.js';
import { storeToRefs } from 'pinia';
import { useQuasar } from 'quasar';
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { exportConversation } from '../services/helpers.js';
import { useTeamsStore } from '@/stores/teams-store.js';
import { exportConversation } from '@/services/helpers.js';
export default {
name: 'History',
Expand Down
12 changes: 6 additions & 6 deletions src/components/Messages.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,17 +156,17 @@
</template>

<script>
import { useTeamsStore } from "../stores/teams-store.js";
import { useSettingsStore } from "../stores/settings-store.js";
import { storeToRefs } from "pinia";
import { useQuasar } from "quasar";
import { computed, ref, watch } from "vue";
import { scroll } from "quasar";
import { useI18n } from 'vue-i18n';
import { imageDB } from "../services/localforage";
import openaiConfig from '../services/openai.config.json';
import logger from '../services/logger.js';
import { useMarkdown } from '../composables/markdown.js'
import { useTeamsStore } from "@/stores/teams-store.js";
import { useSettingsStore } from "@/stores/settings-store.js";
import { imageDB } from "@/services/localforage";
import openaiConfig from '@/services/openai.config.json';
import logger from '@/services/logger.js';
import { useMarkdown } from '@/composables/markdown.js'
export default {
name: "Messages",
Expand Down
11 changes: 5 additions & 6 deletions src/components/OpenAI.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,14 @@
<script>
import { watch, nextTick } from 'vue';
import { useTeamsStore } from '../stores/teams-store.js';
import { useSettingsStore } from '../stores/settings-store.js';
import { storeToRefs } from 'pinia';
import OpenAI from '../services/openai.js';
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import { useMarkdown } from '../composables/markdown.js'
import logger from '../services/logger.js';
import { useTeamsStore } from '@/stores/teams-store.js';
import { useSettingsStore } from '@/stores/settings-store.js';
import { useMarkdown } from '@/composables/markdown.js'
import OpenAI from '@/services/openai.js';
import logger from '@/services/logger.js';
export default {
name: 'OpenAI',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Personas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -227,9 +227,9 @@
import { computed, ref } from 'vue';
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import { useTeamsStore } from '../stores/teams-store.js';
import { storeToRefs } from 'pinia';
import logger from '../services/logger.js';
import { useTeamsStore } from '@/stores/teams-store.js';
import logger from '@/services/logger.js';
export default {
name: 'Personas',
Expand Down
6 changes: 3 additions & 3 deletions src/components/Settings/CloudSyncSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@
<script>
import { computed } from 'vue';
import { useI18n } from 'vue-i18n';
import { storeToRefs } from 'pinia';
import { useSettingsStore } from '../../stores/settings-store';
import { platform } from '@tauri-apps/plugin-os';
import { useQuasar } from 'quasar';
import { useCloudSync } from '../../composables/useCloudSync';
import { storeToRefs } from 'pinia';
import { useSettingsStore } from '@/stores/settings-store';
import { useCloudSync } from '@/composables/useCloudSync';
export default {
name: 'CloudSync',
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/GeneralSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -134,10 +134,10 @@

<script>
import { computed } from 'vue';
import { useSettingsStore } from '../../stores/settings-store.js';
import { storeToRefs } from "pinia";
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { useSettingsStore } from '@/stores/settings-store.js';
export default {
name: 'GeneralSettings',
Expand Down
4 changes: 2 additions & 2 deletions src/components/Settings/ImageGenerationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@
<script>
import { computed, ref, watch } from 'vue';
import { storeToRefs } from "pinia";
import { useSettingsStore } from '../../stores/settings-store.js';
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import openaiConfig from '../../services/openai.config.json';
import { useSettingsStore } from '@/stores/settings-store.js';
import openaiConfig from '@/services/openai.config.json';
export default {
setup() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/OllamaModelManager.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,8 @@

<script>
import { ref, computed, onMounted } from 'vue';
import { useOllama } from '../../composables/useOllama';
import { useQuasar } from 'quasar';
import { useOllama } from '@/composables/useOllama';
export default {
name: 'OllamaModelManager',
Expand Down
16 changes: 8 additions & 8 deletions src/components/Settings/ProviderSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -213,16 +213,16 @@

<script>
import { ref, computed, onMounted, watch } from 'vue';
import { storeToRefs } from "pinia";
import { useSettingsStore } from '../../stores/settings-store.js';
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import defaultProviders from '../../services/providers.config.json';
import { ollamaService } from '../../services/ollama.service';
import ollamaLogo from '../../assets/ollama-logo.png';
import openaiLogo from '../../assets/openai-logo.png';
import { useOllama } from '../../composables/useOllama';
import OllamaModelManager from './OllamaModelManager.vue';
import { storeToRefs } from "pinia";
import { useSettingsStore } from '@/stores/settings-store.js';
import defaultProviders from '@/services/providers.config.json';
import { ollamaService } from '@/services/ollama.service';
import ollamaLogo from '@/assets/ollama-logo.png';
import openaiLogo from '@/assets/openai-logo.png';
import { useOllama } from '@/composables/useOllama';
import OllamaModelManager from '@/components/Settings/OllamaModelManager.vue';
export default {
components: {
Expand Down
10 changes: 5 additions & 5 deletions src/components/Settings/QuickSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,14 @@
<script>
import { computed, ref, watch } from 'vue';
import { useSettingsStore } from '../../stores/settings-store.js';
import { useTeamsStore } from '../../stores/teams-store.js';
import { storeToRefs } from "pinia";
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import openaiConfig from '../../services/openai.config.json';
import { exportConversation } from '../../services/helpers.js';
import logger from '../../services/logger.js';
import { useSettingsStore } from '@/stores/settings-store.js';
import { useTeamsStore } from '@/stores/teams-store.js';
import openaiConfig from '@/services/openai.config.json';
import { exportConversation } from '@/services/helpers.js';
import logger from '@/services/logger.js';
export default {
name: "QuickSettings",
Expand Down
12 changes: 6 additions & 6 deletions src/components/Settings/SettingsDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ import { computed, ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import UserAvatarSettings from './UserAvatarSettings.vue';
import GeneralSettings from './GeneralSettings.vue';
import ProviderSettings from "./ProviderSettings.vue";
import TextGenerationSettings from "./TextGenerationSettings.vue";
import ImageGenerationSettings from "./ImageGenerationSettings.vue";
import CloudSyncSettings from './CloudSyncSettings.vue';
import UserAvatarSettings from '@/components/Settings/UserAvatarSettings.vue';
import GeneralSettings from '@/components/Settings/GeneralSettings.vue';
import ProviderSettings from "@/components/Settings/ProviderSettings.vue";
import TextGenerationSettings from "@/components/Settings/TextGenerationSettings.vue";
import ImageGenerationSettings from "@/components/Settings/ImageGenerationSettings.vue";
import CloudSyncSettings from '@/components/Settings/CloudSyncSettings.vue';
export default {
name: "AppSettings",
Expand Down
6 changes: 3 additions & 3 deletions src/components/Settings/TextGenerationSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -109,11 +109,11 @@

<script>
import { computed, ref, watch } from 'vue';
import { storeToRefs } from "pinia";
import { useSettingsStore } from '../../stores/settings-store.js';
import { useTeamsStore } from '../../stores/teams-store.js';
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import { storeToRefs } from "pinia";
import { useSettingsStore } from '@/stores/settings-store.js';
import { useTeamsStore } from '@/stores/teams-store.js';
export default {
setup() {
Expand Down
2 changes: 1 addition & 1 deletion src/components/Settings/UserAvatarSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@

<script>
import { computed, ref } from 'vue';
import { useSettingsStore } from '../../stores/settings-store.js';
import { storeToRefs } from "pinia";
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { useSettingsStore } from '@/stores/settings-store.js';
export default {
name: 'UserAvatarSettings',
Expand Down
6 changes: 3 additions & 3 deletions src/components/UserInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,12 @@

<script>
import { ref, computed, onMounted, watch } from 'vue';
import { useTeamsStore } from '../stores/teams-store.js';
import { useSettingsStore } from "../stores/settings-store.js";
import { storeToRefs } from 'pinia';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import logger from '../services/logger';
import logger from '@/services/logger';
import { useTeamsStore } from '@/stores/teams-store.js';
import { useSettingsStore } from "@/stores/settings-store.js";
export default {
name: 'UserInput',
Expand Down
9 changes: 4 additions & 5 deletions src/composables/useCloudSync.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { ref } from 'vue';
import { useI18n } from 'vue-i18n';
import { useQuasar } from 'quasar';
import { storeToRefs } from 'pinia';
import { useSettingsStore } from '../stores/settings-store';
import { useTeamsStore } from '../stores/teams-store';
import iCloudService from '../services/iCloudService';
import logger from '../services/logger';
import { useSettingsStore } from '@/stores/settings-store';
import { useTeamsStore } from '@/stores/teams-store';
import iCloudService from '@/services/iCloudService';
import logger from '@/services/logger';

export function useCloudSync() {
const { t } = useI18n();
Expand Down
4 changes: 2 additions & 2 deletions src/composables/useOllama.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ref, computed } from 'vue';
import { ref } from 'vue';
import { useQuasar } from 'quasar';
import { ollamaService } from '../services/ollama.service';
import { Command } from '@tauri-apps/plugin-shell';
import { platform } from '@tauri-apps/plugin-os';
import { ollamaService } from '@/services/ollama.service';

export function useOllama() {
const $q = useQuasar();
Expand Down
6 changes: 3 additions & 3 deletions src/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { createApp } from "vue";
import App from "./App.vue";
import App from "@/App.vue";

// Quasar stuff
import { Quasar, Dark, Dialog, Notify } from 'quasar';
Expand All @@ -13,11 +13,11 @@ import "./styles.css";

// Pinia stuff
import { createPinia } from 'pinia';
import { localForagePlugin } from './services/localforage';
import { localForagePlugin } from '@/services/localforage';

// i18n stuff
import { createI18n } from 'vue-i18n';
import messages from './i18n';
import messages from '@/i18n';

// ---------------------------------------------------------------------------------------------
// Create the app
Expand Down
6 changes: 3 additions & 3 deletions src/services/databaseUpgrader.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useQuasar } from 'quasar';
import { useI18n } from 'vue-i18n';
import { imageDB, settingsDB, teamsDB } from '../services/localforage.js';
import { useSettingsStore } from '../stores/settings-store.js';
import logger from './logger.js';
import { imageDB, settingsDB, teamsDB } from '@/services/localforage.js';
import { useSettingsStore } from '@/stores/settings-store.js';
import logger from '@/services/logger.js';

const databaseUpgrader = () => {

Expand Down
2 changes: 1 addition & 1 deletion src/services/helpers.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useTeamsStore } from '../stores/teams-store.js';
import { useTeamsStore } from '@/stores/teams-store.js';

// Converts an epoch timestamp to a localized date and time string.
const epochStringToDate = (timestamp) => {
Expand Down
2 changes: 1 addition & 1 deletion src/services/iCloudService.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { join } from '@tauri-apps/api/path';
import { homeDir } from '@tauri-apps/api/path';
import { platform } from '@tauri-apps/plugin-os';
import { readFile, create, readDir, mkdir, remove } from '@tauri-apps/plugin-fs';
import logger from './logger';
import logger from '@/services/logger';

const iCloudService = {
VERSION: '1.0',
Expand Down
2 changes: 1 addition & 1 deletion src/services/localforage.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import localforage from 'localforage';
import logger from './logger.js';
import logger from '@/services/logger.js';

const dbName = 'TeamAI';

Expand Down
2 changes: 1 addition & 1 deletion src/services/ollama.service.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Ollama } from 'ollama/browser';
import { Command, open } from '@tauri-apps/plugin-shell';
import { platform } from '@tauri-apps/plugin-os';
import logger from './logger';
import logger from '@/services/logger';

class OllamaService {
constructor() {
Expand Down
8 changes: 4 additions & 4 deletions src/services/openai.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { useSettingsStore } from '../stores/settings-store.js';
import { storeToRefs } from 'pinia';
import { imageDB } from './localforage.js';
import logger from './logger.js';
import providersConfig from '../services/providers.config.json';
import { useSettingsStore } from '@/stores/settings-store.js';
import { imageDB } from '@/services/localforage.js';
import logger from '@/services/logger.js';
import providersConfig from '@/services/providers.config.json';

const openAI = () => {
const settingsStore = useSettingsStore()
Expand Down
4 changes: 2 additions & 2 deletions src/stores/teams-store.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { ref } from 'vue';
import { defineStore } from 'pinia';
import { imageDB } from '../services/localforage';
import logger from '../services/logger';
import { imageDB } from '@/services/localforage';
import logger from '@/services/logger';

// The teams-store holds the teams creeated by the user in a list. A team is a list of AI assistants, bots
// Each team object has an array of team member objects and an array of messages.
Expand Down
Loading

0 comments on commit d40174d

Please sign in to comment.