feat(discovery): enhance discovery index reading and issue exporting

- Improved the reading of the discovery index by adding a fallback mechanism to scan directories for discovery folders if the index.json is invalid or missing.
- Added sorting of discoveries by creation time in descending order.
- Enhanced the `appendToIssuesJsonl` function to include deduplication logic for issues based on ID and source finding ID.
- Updated the discovery route handler to reflect the number of issues added and skipped during export.
- Introduced UI elements for selecting and deselecting findings in the dashboard.
- Added CSS styles for exported findings and action buttons.
- Implemented search functionality for filtering findings based on title, file, and description.
- Added internationalization support for new UI elements.
- Created scripts for automated API extraction from various project types, including FastAPI and TypeScript.
- Documented the API extraction process and library bundling instructions.
This commit is contained in:
catlog22
2025-12-28 19:27:34 +08:00
parent 3ef1e54412
commit 169f218f7a
18 changed files with 1602 additions and 612 deletions

View File

@@ -24,7 +24,7 @@ interface Issue {
status: 'registered'; // Initial status
priority: number; // 1 (critical) to 5 (low)
context: string; // Problem description
source: 'github' | 'text'; // Input source type
source: 'github' | 'text' | 'discovery'; // Input source type
source_url?: string; // GitHub URL if applicable
labels?: string[]; // Categorization labels
@@ -35,6 +35,18 @@ interface Issue {
affected_components?: string[];// Files/modules affected
reproduction_steps?: string[]; // Steps to reproduce
// Discovery context (when source='discovery')
discovery_context?: {
discovery_id: string; // Source discovery session
perspective: string; // bug, test, quality, etc.
category: string; // Finding category
file: string; // Primary affected file
line: number; // Line number
snippet?: string; // Code snippet
confidence: number; // Agent confidence (0-1)
suggested_fix?: string; // Suggested remediation
};
// Closed-loop requirements (guide plan generation)
lifecycle_requirements: {
test_strategy: 'unit' | 'integration' | 'e2e' | 'manual' | 'auto';