Skip to content

Commit b190122

Browse files
Slinetracgemini-code-assist[bot]nekomeowww
authored
feat(stage-ui,stage-web): Implement Comprehensive Module Settings Management with Frontend UI and Backend WebSocket Integration (#617)
--------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Neko Ayaka <neko@ayaka.moe>
1 parent de3f8d9 commit b190122

File tree

123 files changed

+2240
-504
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

123 files changed

+2240
-504
lines changed

apps/stage-tamagotchi-electron/src/renderer/main.ts

Lines changed: 9 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
1-
import type { Plugin } from 'vue'
2-
3-
import Tres from '@tresjs/core'
4-
5-
import { autoAnimatePlugin } from '@formkit/auto-animate/vue'
6-
import { MotionPlugin } from '@vueuse/motion'
1+
import { initializeApp } from '@proj-airi/stage-ui/services'
72
import { createPinia } from 'pinia'
83
import { setupLayouts } from 'virtual:generated-layouts'
9-
import { createApp } from 'vue'
104
import { createRouter, createWebHashHistory } from 'vue-router'
115
import { routes } from 'vue-router/auto-routes'
126

@@ -38,12 +32,11 @@ const router = createRouter({
3832
routes: setupLayouts(routes),
3933
})
4034

41-
createApp(App)
42-
.use(MotionPlugin)
43-
// TODO: Fix autoAnimatePlugin type error
44-
.use(autoAnimatePlugin as unknown as Plugin)
45-
.use(router)
46-
.use(pinia)
47-
.use(i18n)
48-
.use(Tres)
49-
.mount('#app')
35+
// Initialize and mount the app using the shared initialization logic
36+
initializeApp(App, {
37+
router,
38+
pinia,
39+
i18n,
40+
}).then((app) => {
41+
app.mount('#app')
42+
})
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup lang="ts">
2+
import { GamingFactorio } from '@proj-airi/stage-ui/components'
3+
</script>
4+
5+
<template>
6+
<GamingFactorio />
7+
</template>
8+
9+
<route lang="yaml">
10+
meta:
11+
layout: settings
12+
stageTransition:
13+
name: slide
14+
pageSpecificAvailable: true
15+
</route>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup lang="ts">
2+
import { GamingMinecraft } from '@proj-airi/stage-ui/components'
3+
</script>
4+
5+
<template>
6+
<GamingMinecraft />
7+
</template>
8+
9+
<route lang="yaml">
10+
meta:
11+
layout: settings
12+
stageTransition:
13+
name: slide
14+
pageSpecificAvailable: true
15+
</route>

apps/stage-tamagotchi-electron/src/renderer/pages/settings/modules/index.vue

Lines changed: 2 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,118 +1,12 @@
11
<script setup lang="ts">
22
import { IconStatusItem } from '@proj-airi/stage-ui/components'
3-
import { useConsciousnessStore } from '@proj-airi/stage-ui/stores/modules/consciousness'
4-
import { useSpeechStore } from '@proj-airi/stage-ui/stores/modules/speech'
5-
import { computed } from 'vue'
6-
import { useI18n } from 'vue-i18n'
3+
import { useModulesList } from '@proj-airi/stage-ui/composables/use-modules-list'
74
85
import IconAnimation from '../../../components/IconAnimation.vue'
96
107
import { useIconAnimation } from '../../../composables/icon-animation'
118
12-
const { t } = useI18n()
13-
14-
interface Module {
15-
id: string
16-
name: string
17-
description: string
18-
icon?: string
19-
iconColor?: string
20-
iconImage?: string
21-
to: string
22-
configured: boolean
23-
}
24-
25-
// TODO: categorize modules, such as essential, messaging, gaming, etc.
26-
const modulesList = computed<Module[]>(() => [
27-
{
28-
id: 'consciousness',
29-
name: t('settings.pages.modules.consciousness.title'),
30-
description: t('settings.pages.modules.consciousness.description'),
31-
icon: 'i-solar:ghost-bold-duotone',
32-
to: '/settings/modules/consciousness',
33-
configured: useConsciousnessStore().configured,
34-
},
35-
{
36-
id: 'speech',
37-
name: t('settings.pages.modules.speech.title'),
38-
description: t('settings.pages.modules.speech.description'),
39-
icon: 'i-solar:user-speak-rounded-bold-duotone',
40-
to: '/settings/modules/speech',
41-
configured: useSpeechStore().configured,
42-
},
43-
{
44-
id: 'hearing',
45-
name: t('settings.pages.modules.hearing.title'),
46-
description: t('settings.pages.modules.hearing.description'),
47-
icon: 'i-solar:microphone-3-bold-duotone',
48-
to: '/settings/modules/hearing',
49-
configured: false,
50-
},
51-
{
52-
id: 'vision',
53-
name: t('settings.pages.modules.vision.title'),
54-
description: t('settings.pages.modules.vision.description'),
55-
icon: 'i-solar:eye-closed-bold-duotone',
56-
to: '',
57-
configured: false,
58-
},
59-
{
60-
id: 'memory-short-term',
61-
name: t('settings.pages.modules.memory-short-term.title'),
62-
description: t('settings.pages.modules.memory-short-term.description'),
63-
icon: 'i-solar:bookmark-bold-duotone',
64-
to: '/settings/modules/memory-short-term',
65-
configured: false,
66-
},
67-
{
68-
id: 'memory-long-term',
69-
name: t('settings.pages.modules.memory-long-term.title'),
70-
description: t('settings.pages.modules.memory-long-term.description'),
71-
icon: 'i-solar:book-bookmark-bold-duotone',
72-
to: '/settings/modules/memory-long-term',
73-
configured: false,
74-
},
75-
{
76-
id: 'messaging-discord',
77-
name: t('settings.pages.modules.messaging-discord.title'),
78-
description: t('settings.pages.modules.messaging-discord.description'),
79-
icon: 'i-simple-icons:discord',
80-
to: '',
81-
configured: false,
82-
},
83-
{
84-
id: 'x',
85-
name: t('settings.pages.modules.x.title'),
86-
description: t('settings.pages.modules.x.description'),
87-
icon: 'i-simple-icons:x',
88-
to: '',
89-
configured: false,
90-
},
91-
{
92-
id: 'game-minecraft',
93-
name: t('settings.pages.modules.gaming-minecraft.title'),
94-
description: t('settings.pages.modules.gaming-minecraft.description'),
95-
iconColor: 'i-vscode-icons:file-type-minecraft',
96-
to: '',
97-
configured: false,
98-
},
99-
{
100-
id: 'game-factorio',
101-
name: t('settings.pages.modules.gaming-factorio.title'),
102-
description: t('settings.pages.modules.gaming-factorio.description'),
103-
iconImage: '',
104-
to: '',
105-
configured: false,
106-
},
107-
{
108-
id: 'mcp-server',
109-
name: t('settings.pages.modules.mcp-server.title'),
110-
description: t('settings.pages.modules.mcp-server.description'),
111-
icon: 'i-solar:server-bold-duotone',
112-
to: '/settings/modules/mcp',
113-
configured: false,
114-
},
115-
])
9+
const { modulesList } = useModulesList()
11610
11711
const {
11812
iconAnimationStarted,
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup lang="ts">
2+
import { MessagingDiscord } from '@proj-airi/stage-ui/components'
3+
</script>
4+
5+
<template>
6+
<MessagingDiscord />
7+
</template>
8+
9+
<route lang="yaml">
10+
meta:
11+
layout: settings
12+
stageTransition:
13+
name: slide
14+
pageSpecificAvailable: true
15+
</route>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<script setup lang="ts">
2+
import { X } from '@proj-airi/stage-ui/components'
3+
</script>
4+
5+
<template>
6+
<X />
7+
</template>
8+
9+
<route lang="yaml">
10+
meta:
11+
layout: settings
12+
stageTransition:
13+
name: slide
14+
pageSpecificAvailable: true
15+
</route>

apps/stage-tamagotchi-electron/src/renderer/pages/settings/providers/302-ai.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ProviderSettingsContainer,
1111
ProviderSettingsLayout,
1212
} from '@proj-airi/stage-ui/components'
13-
import { useProviderValidation } from '@proj-airi/stage-ui/composables/useProviderValidation'
13+
import { useProviderValidation } from '@proj-airi/stage-ui/composables/use-provider-validation'
1414
import { useProvidersStore } from '@proj-airi/stage-ui/stores/providers'
1515
import { storeToRefs } from 'pinia'
1616
import { computed } from 'vue'

apps/stage-tamagotchi-electron/src/renderer/pages/settings/providers/anthropic.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ProviderSettingsContainer,
1111
ProviderSettingsLayout,
1212
} from '@proj-airi/stage-ui/components'
13-
import { useProviderValidation } from '@proj-airi/stage-ui/composables/useProviderValidation'
13+
import { useProviderValidation } from '@proj-airi/stage-ui/composables/use-provider-validation'
1414
import { useProvidersStore } from '@proj-airi/stage-ui/stores/providers'
1515
import { storeToRefs } from 'pinia'
1616
import { computed } from 'vue'

apps/stage-tamagotchi-electron/src/renderer/pages/settings/providers/azure-ai-foundry.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
ProviderSettingsContainer,
1111
ProviderSettingsLayout,
1212
} from '@proj-airi/stage-ui/components'
13-
import { useProviderValidation } from '@proj-airi/stage-ui/composables/useProviderValidation'
13+
import { useProviderValidation } from '@proj-airi/stage-ui/composables/use-provider-validation'
1414
import { useProvidersStore } from '@proj-airi/stage-ui/stores/providers'
1515
import { storeToRefs } from 'pinia'
1616
import { computed } from 'vue'

apps/stage-tamagotchi-electron/src/renderer/pages/settings/providers/cloudflare-workers-ai.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import {
99
ProviderSettingsContainer,
1010
ProviderSettingsLayout,
1111
} from '@proj-airi/stage-ui/components'
12-
import { useProviderValidation } from '@proj-airi/stage-ui/composables/useProviderValidation'
12+
import { useProviderValidation } from '@proj-airi/stage-ui/composables/use-provider-validation'
1313
import { useProvidersStore } from '@proj-airi/stage-ui/stores/providers'
1414
import { storeToRefs } from 'pinia'
1515
import { computed } from 'vue'

0 commit comments

Comments
 (0)