add Pascal/Lazarus support and stabilize LLM semantic extraction#682
Open
JClarQ wants to merge 4 commits intosafishamsi:v6from
Open
add Pascal/Lazarus support and stabilize LLM semantic extraction#682JClarQ wants to merge 4 commits intosafishamsi:v6from
JClarQ wants to merge 4 commits intosafishamsi:v6from
Conversation
…c extraction settings
- Implement _repair_json to recover partial data from truncated LLM responses - Update _parse_llm_json to attempt repair before failing - Refine _extract_with_adaptive_retry to silence parse errors during recursive splitting - Ensure errors are only reported when recursion depth is exhausted or for logic errors
|
Hi, Pascal Severity: action required | Category: correctness How to fix: Resolve units to file IDs Agent prompt to fix - you can give this to your LLM of choice:
Spotted by Qodo code review - free for open-source projects. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This pull request introduces comprehensive support for FreePascal and Lazarus projects while significantly improving the stability and resilience of the semantic extraction pipeline. It integrates robust AST extraction for Pascal files and implements a JSON repair mechanism to handle truncated or malformed LLM responses effectively.
Key Changes
1. FreePascal & Lazarus Support
detect.pyto recognize.pas,.pp,.inc,.lpr,.lfm, and.lpiextensions.tree-sitter-language-packviapyproject.tomlfor dynamic Pascal grammar support.usesclauses.2. Semantic Extraction Stabilization
_repair_jsonutility to recover partial data from truncated LLM outputs (e.g.,gpt-5.4-mini) by automatically closing unclosed strings and brackets._parse_llm_jsonto attempt repairs before discarding data, increasing resilience against token limits._extract_with_adaptive_retryto distinguish between recoverable truncation and logic errors, reducing log noise and preventing unnecessary retries.3. CLI & Backend Improvements
openaias a supported backend withgpt-5.4-minias the default model.GRAPHIFY_MODELenvironment variable to allow easy model switching without code changes.--semanticflag for theupdatecommand to allow manual triggering of LLM-based enrichment during project updates.Verification
--semanticflag correctly triggers enrichment and merges findings into the knowledge graph.