mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-03-01 10:33:25 +08:00
feat: Add comprehensive tests for contentPattern and glob pattern matching
- Implemented final verification tests for contentPattern to validate behavior with empty strings, dangerous patterns, and normal patterns. - Created glob pattern matching tests to verify regex conversion and matching functionality. - Developed infinite loop risk tests using Worker threads to isolate potential blocking operations. - Introduced optimized contentPattern tests to validate improvements in the findMatches function. - Added verification tests to assess the effectiveness of contentPattern optimizations. - Conducted safety tests for contentPattern to identify edge cases and potential vulnerabilities. - Implemented unrestricted loop tests to analyze infinite loop risks without match limits. - Developed tests for zero-width pattern detection logic to ensure proper handling of dangerous regex patterns.
This commit is contained in:
@@ -5604,3 +5604,29 @@ export async function upgradeCcwInstallation(
|
||||
body: JSON.stringify({ path }),
|
||||
});
|
||||
}
|
||||
|
||||
// ========== Team API ==========
|
||||
|
||||
export async function fetchTeams(): Promise<{ teams: Array<{ name: string; messageCount: number; lastActivity: string }> }> {
|
||||
return fetchApi('/api/teams');
|
||||
}
|
||||
|
||||
export async function fetchTeamMessages(
|
||||
teamName: string,
|
||||
params?: { from?: string; to?: string; type?: string; last?: number; offset?: number }
|
||||
): Promise<{ total: number; showing: number; messages: Array<Record<string, unknown>> }> {
|
||||
const searchParams = new URLSearchParams();
|
||||
if (params?.from) searchParams.set('from', params.from);
|
||||
if (params?.to) searchParams.set('to', params.to);
|
||||
if (params?.type) searchParams.set('type', params.type);
|
||||
if (params?.last) searchParams.set('last', String(params.last));
|
||||
if (params?.offset) searchParams.set('offset', String(params.offset));
|
||||
const qs = searchParams.toString();
|
||||
return fetchApi(`/api/teams/${encodeURIComponent(teamName)}/messages${qs ? `?${qs}` : ''}`);
|
||||
}
|
||||
|
||||
export async function fetchTeamStatus(
|
||||
teamName: string
|
||||
): Promise<{ members: Array<{ member: string; lastSeen: string; lastAction: string; messageCount: number }>; total_messages: number }> {
|
||||
return fetchApi(`/api/teams/${encodeURIComponent(teamName)}/status`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user