feat: add pwd handling to session and update related components

This commit is contained in:
Justin Lin committed 2025-04-25 11:33:16 +08:00
1 parent fba92dad46
commit 26e79690f8
7 files changed
+16 -4

No files matched your search

+4
View File
@@ -51,6 +51,7 @@ const useSession = defineStore('session', {
this.session = {
...session,
graph: new FileGraph(session.graph),
pwd: '/home/commander',
}
term.reset()
await socket.connect(this.session)
@@ -105,6 +106,9 @@ const useSession = defineStore('session', {
socket.on('graph', (event: FileGraphUpdateEvent) => {
if (!this.session) return
this.session.graph.handleEvent(event)
if (event.pwd) {
this.session.pwd = event.pwd
}
})
socket.on('update', (update: SessionUpdate) => {
this.newUpdate(update)