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:
@@ -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 });
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user