docs(guide): rewrite CLAUDE.md with ZCLAW-first perspective

Major changes:
- Shift from "OpenFang desktop client" to "independent AI Agent desktop app"
- Add decision principle: "Is this useful for ZCLAW? Does it affect ZCLAW?"
- Simplify project structure and tech stack sections
- Replace OpenClaw vs OpenFang comparison with unified backend approach
- Consolidate troubleshooting from scattered sections into organized FAQ
- Update Hands system documentation with 8 capabilities and status
- Stream
This commit is contained in:
iven
2026-03-20 19:30:09 +08:00
parent 3518fc8ece
commit 6f72442531
63 changed files with 8920 additions and 857 deletions

View File

@@ -139,11 +139,25 @@ export const useTeamStore = create<TeamStoreState>()(
set({ isLoading: true, error: null });
try {
// For now, load from localStorage until API is available
// Note: persist middleware stores data as { state: { teams: [...] }, version: ... }
const stored = localStorage.getItem('zclaw-teams');
const teams: Team[] = stored ? parseJsonOrDefault<Team[]>(stored, []) : [];
let teams: Team[] = [];
if (stored) {
const parsed = JSON.parse(stored);
// Handle persist middleware format
if (parsed?.state?.teams && Array.isArray(parsed.state.teams)) {
teams = parsed.state.teams;
} else if (Array.isArray(parsed)) {
// Direct array format (legacy)
teams = parsed;
}
}
set({ teams, isLoading: false });
} catch (error) {
set({ error: (error as Error).message, isLoading: false });
console.error('[TeamStore] Failed to load teams:', error);
set({ teams: [], isLoading: false });
}
},