v0.9.0 user and session management improvement, xterm.js addons

This commit is contained in:
2026-02-07 15:37:52 -05:00
parent 0a85cc88bb
commit 820ad7eb27
62 changed files with 875 additions and 446 deletions

View File

@ -1,4 +1,3 @@
// FILE: lixenwraith/chess/internal/client/command/auth.go
package command
import (
@ -119,10 +118,20 @@ func loginHandler(s *session.Session, args []string) error {
}
func logoutHandler(s *session.Session, args []string) error {
c := s.GetClient().(*api.Client)
// Call server to invalidate session if authenticated
if s.GetAuthToken() != "" {
if err := c.Logout(); err != nil {
// Log but don't fail - clear local state anyway
display.Println(display.Yellow, "Server logout failed: %s", err.Error())
}
}
// Clear local state
s.SetAuthToken("")
s.SetCurrentUser("")
s.SetUsername("")
c := s.GetClient().(*api.Client)
c.SetToken("")
display.Println(display.Green, "Logged out")

View File

@ -1,4 +1,3 @@
// FILE: lixenwraith/chess/internal/client/command/debug.go
package command
import (

View File

@ -1,4 +1,3 @@
// FILE: lixenwraith/chess/internal/client/command/game.go
package command
import (

View File

@ -1,4 +1,3 @@
// FILE: lixenwraith/chess/internal/client/command/pass_native.go
//go:build !js && !wasm
package command

View File

@ -1,4 +1,3 @@
// FILE: lixenwraith/chess/internal/client/command/pass_wasm.go
//go:build js && wasm
package command

View File

@ -1,4 +1,3 @@
// FILE: lixenwraith/chess/internal/client/command/registry.go
package command
import (