Skip to content

Commit b780734

Browse files
author
catlog22
committed
Add comprehensive command and skill reference documentation in Chinese
- Created a new document for command and skill references, detailing orchestrator commands, workflow session commands, issue workflow commands, IDAW commands, with-file workflows, cycle workflows, CLI commands, memory commands, team skills, workflow skills, utility skills, and Codex capabilities. - Added a comparison table for workflows, outlining their best uses, levels, self-containment, and automatic chaining behavior.
1 parent 3bb4a82 commit b780734

12 files changed

Lines changed: 2216 additions & 206 deletions

File tree

ccw/frontend/src/main.tsx

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,14 @@ import 'xterm/css/xterm.css'
88
import { loadMessagesForLocale, getInitialLocale } from './lib/i18n'
99
import { logWebVitals } from './lib/webVitals'
1010

11-
/**
12-
* Initialize CSRF token by fetching from backend
13-
* This ensures the CSRF cookie is set before any mutating API calls
14-
*/
15-
async function initCsrfToken() {
16-
try {
17-
// Fetch CSRF token from backend - this sets the XSRF-TOKEN cookie
18-
await fetch('/api/csrf-token', {
19-
method: 'GET',
20-
credentials: 'same-origin',
21-
})
22-
} catch (error) {
23-
// Log error but don't block app initialization
24-
console.error('Failed to initialize CSRF token:', error)
25-
}
26-
}
27-
2811
async function bootstrapApplication() {
2912
const rootElement = document.getElementById('root')
3013
if (!rootElement) throw new Error('Failed to find the root element')
3114

32-
// Parallelize CSRF token fetch and locale detection (independent operations)
33-
const [, locale] = await Promise.all([
34-
initCsrfToken(),
35-
getInitialLocale()
36-
])
15+
// CSRF token initialization is deferred to first mutating request
16+
// This eliminates network RTT from app startup path
17+
// See: ccw/frontend/src/lib/api.ts - fetchApi handles lazy token fetch
18+
const locale = await getInitialLocale()
3719

3820
// Load only the active locale's messages (lazy load secondary on demand)
3921
const messages = await loadMessagesForLocale(locale)

ccw/src/core/routes/cli-routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1093,7 +1093,7 @@ export async function handleCliRoutes(ctx: RouteContext): Promise<boolean> {
10931093
return { error: 'Execution not found', status: 404 };
10941094
}
10951095

1096-
const review = historyStore.saveReview({
1096+
const review = await historyStore.saveReview({
10971097
execution_id: executionId,
10981098
status,
10991099
rating,

ccw/src/core/routes/memory-routes.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,7 @@ Return ONLY valid JSON in this exact format (no markdown, no code blocks, just p
589589
const storeModule = await import('../../tools/cli-history-store.js');
590590
const store = storeModule.getHistoryStore(projectPath);
591591
const insightId = `insight-${Date.now()}`;
592-
store.saveInsight({
592+
await store.saveInsight({
593593
id: insightId,
594594
tool,
595595
promptCount: prompts.length,

0 commit comments

Comments
 (0)