mirror of
https://github.com/catlog22/Claude-Code-Workflow.git
synced 2026-02-28 09:23:08 +08:00
Add tests and implement functionality for staged cascade search and LSP expansion
- Introduced a new JSON file for verbose output of the Codex Lens search results. - Added unit tests for binary search functionality in `test_stage1_binary_search_uses_chunk_lines.py`. - Implemented regression tests for staged cascade Stage 2 expansion depth in `test_staged_cascade_lsp_depth.py`. - Created unit tests for staged cascade Stage 2 realtime LSP graph expansion in `test_staged_cascade_realtime_lsp.py`. - Enhanced the ChainSearchEngine to respect configuration settings for staged LSP depth and improve search accuracy.
This commit is contained in:
36
ccw/frontend/src/lib/nativeDialog.ts
Normal file
36
ccw/frontend/src/lib/nativeDialog.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* Native OS dialog helpers
|
||||
* Calls server-side endpoints that open system-native file/folder picker dialogs.
|
||||
*/
|
||||
|
||||
export async function selectFolder(initialDir?: string): Promise<string | null> {
|
||||
try {
|
||||
const res = await fetch('/api/dialog/select-folder', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ initialDir }),
|
||||
});
|
||||
if (!res.ok) return null;
|
||||
const data = await res.json();
|
||||
if (data.cancelled) return null;
|
||||
return data.path || null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
export async function selectFile(initialDir?: string): Promise<string | null> {
|
||||
try {
|
||||
const res = await fetch('/api/dialog/select-file', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ initialDir }),
|
||||
});
|
||||
if (!res.ok) return null;
|
||||
const data = await res.json();
|
||||
if (data.cancelled) return null;
|
||||
return data.path || null;
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
@@ -59,7 +59,7 @@ export async function searchUnsplash(
|
||||
export async function uploadBackgroundImage(file: File): Promise<{ url: string; filename: string }> {
|
||||
const headers: Record<string, string> = {
|
||||
'Content-Type': file.type,
|
||||
'X-Filename': file.name,
|
||||
'X-Filename': encodeURIComponent(file.name),
|
||||
};
|
||||
const csrfToken = getCsrfToken();
|
||||
if (csrfToken) {
|
||||
|
||||
Reference in New Issue
Block a user