fix: write echo start on starting

This commit is contained in:
Justin Lin committed 2025-05-05 19:55:40 +08:00
1 parent 156abc044a
commit 2f7845e63e
3 files changed
+38 -33

No files matched your search

+3 -3
View File
@@ -53,10 +53,10 @@ const useSession = defineStore('session', {
containerName: session.containerName || '',
}
term.reset()
term.connect(
await socket.connect(this.session)
await term.connect(
`/terminal/${session.containerName}/ws?token=${session.token}`
)
await socket.connect(this.session)
term.focus()
},
async createSession() {
@@ -64,7 +64,7 @@ const useSession = defineStore('session', {
questId: this.questId,
})
await this.setSession(session)
socket.emit('terminal', 'echo start\n')
term.send('echo start\n')
},
async getActiveSession() {
const session = await trpc.session.getActiveSession.query({