-
-
Notifications
You must be signed in to change notification settings - Fork 564
Generate RAG index for HarmonyBot #727
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generate RAG index for HarmonyBot #727
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
Reply with @codex fix comments to fix any unresolved comments.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
.github/workflows/docs.yml
Outdated
| paths: | ||
| - 'Documentation/**' | ||
| - 'Harmony/**' | ||
| - 'scripts/generate_llm_pack.py' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Restore docs workflow trigger for Lib.Harmony changes
The docs workflow no longer runs when files under Lib.Harmony/ change. The previous configuration explicitly listed that folder, but the new path filter only covers Harmony/** plus the new generator script. API metadata is produced from Lib.Harmony/bin/Debug/net35/0Harmony.dll, so any API changes applied solely in Lib.Harmony will now bypass the workflow and leave both the documentation and the llm-pack stale. Consider reintroducing Lib.Harmony/** to the trigger list.
Useful? React with 👍 / 👎.
| # API | ||
| for path in Path('Documentation/api').rglob('*.yml'): | ||
| with path.open(encoding='utf-8') as f: | ||
| data = yaml.safe_load(f) | ||
| for item in data.get('items', []): | ||
| uid = item.get('uid') | ||
| kind = (item.get('type') or '').lower() | ||
| if not uid or not kind: | ||
| continue | ||
| summary = item.get('summary') | ||
| signature = item.get('syntax', {}).get('content') | ||
| remarks = item.get('remarks') | ||
| parent = item.get('parent') | ||
| doc_page = uid if not parent or parent == 'HarmonyLib' else parent | ||
| doc_url = f'https://harmony.pardeike.net/docs/api/{doc_page}.html' | ||
| cards.append({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[P1] Generated API URLs break for generic types
The LLM pack builds API URLs by concatenating the raw uid with .html. DocFX does not emit HTML files with the raw UID for generic or overloaded types (e.g. HarmonyLib.AccessTools.FieldRef<T> becomes HarmonyLib.AccessTools.FieldRef-1.html). For any API element whose UID contains characters like < and >, the resulting doc_url will point to a non-existent page, yielding unusable entries in the JSONL index. Using the href field provided in the YAML or applying the same sanitization as DocFX would keep the links valid.
Useful? React with 👍 / 👎.
Test Results 119 files 119 suites 8m 23s ⏱️ Results for commit b8ec066. |
Summary
Testing
dotnet format --verbosity minimaldotnet test HarmonyTests/HarmonyTests.csproj -c Release -f net9.0https://chatgpt.com/codex/tasks/task_e_68bae3197f5883299dc9a33af7e46204