feat: connect terminal service to backend

feat: put terminal service into container

refactor: separate main into terminal and websocket

feat: create zsh using commander in home

feat: pass backendUrl to container

feat: pass token to ws server to cmd-hook

feat: gen terminal access token for frontend

feat: success to connect through traefik

fix: handle invalid jwt

feat: connect to session container via traefik
This commit is contained in:
Justin Lin committed 2025-05-05 19:53:33 +08:00
1 parent 0b08a9a5d9
commit 5e81db2759
20 files changed
+281 -209

No files matched your search

+1
View File
@@ -22,6 +22,7 @@ const tasks = computed(() => {
<div class="h-full w-full max-h-full">
<p id="topic" class="text-text font-black" v-if="sessionStore.quest">
{{ sessionStore.quest.title }}
{{ sessionStore.session?.token }}
</p>
<br />
<div>
+6 -6
View File
@@ -94,12 +94,12 @@ const useSession = defineStore('session', {
},
setup() {
if (hasSetup) return
socket.on('terminal', (data: string) => {
term.write(data)
})
term.onData((data: string) => {
socket.emit('terminal', data)
})
// socket.on('terminal', (data: string) => {
// term.write(data)
// })
// term.onData((data: string) => {
// socket.emit('terminal', data)
// })
socket.on('graph', (event: FileGraphUpdateEvent) => {
if (!this.session) return
this.session.graph.handleEvent(event)
+1
View File
@@ -21,4 +21,5 @@ export interface Session {
pwd: string
tasks: ITask[]
responses: IResponse[]
token: string
}