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

@@ -206,11 +206,17 @@ export const useHandStore = create<HandStore>((set, get) => ({
loadHands: async () => {
const client = get().client;
if (!client) return;
console.log('[HandStore] loadHands called, client:', !!client);
if (!client) {
console.warn('[HandStore] No client available, skipping loadHands');
return;
}
set({ isLoading: true });
try {
console.log('[HandStore] Calling client.listHands()...');
const result = await client.listHands();
console.log('[HandStore] listHands result:', result);
const validStatuses = ['idle', 'running', 'needs_approval', 'error', 'unavailable', 'setup_needed'] as const;
const hands: Hand[] = (result?.hands || []).map((h: Record<string, unknown>) => {
const status = validStatuses.includes(h.status as Hand['status'])
@@ -228,8 +234,10 @@ export const useHandStore = create<HandStore>((set, get) => ({
metricCount: (h.metric_count as number) || ((h.metrics as unknown[])?.length),
};
});
console.log('[HandStore] Mapped hands:', hands.length, 'items');
set({ hands, isLoading: false });
} catch {
} catch (err) {
console.error('[HandStore] loadHands error:', err);
set({ isLoading: false });
}
},