Small issue refiner fixes
All checks were successful
Publish Library / Build NPM Project (push) Successful in 4s
Publish Library / Tag Version (push) Successful in 10s
Code review / review (pull_request) Successful in 1m1s

This commit is contained in:
2025-12-30 15:18:02 -05:00
parent 1f48b5a872
commit af09bd0f53
2 changed files with 3 additions and 3 deletions

View File

@@ -14,7 +14,7 @@ jobs:
git checkout ${{ github.event.repository.default_branch }}
- name: Run AI Formatter
run: npx -y @ztimson/ai-agents@latest format .github/issue_template/ai-refinement.md
run: npx -y @ztimson/ai-agents@latest refine .github/issue_template/ai-refinement.md
env:
AI_HOST: anthropic
AI_MODEL: claude-sonnet-4-5

View File

@@ -12,7 +12,7 @@ dotenv.config({path: '.env.local', override: true, quiet: true});
(async () => {
let p = process.argv[process.argv.length - 1];
if(p === 'refine' || p.endsWith('refine.mjs')) p = null;
if(!/(\/|[A-Z]:)/.test(p)) p = path.join(process.cwd(), p);
if(!/^(\/|[A-Z]:)/m.test(p)) p = path.join(process.cwd(), p);
if(!p || !fs.existsSync(p)) throw new Error('Please provide a template');
@@ -83,7 +83,7 @@ ${template.trim()}
Output ONLY the formatted ticket, no explanation.`
})
const messages = await ai.language.ask(`Title: ${issueData.title}\n\nDescription:\n${issueData.body || 'No description provided'}`).catch(() => []);;
const messages = await ai.language.ask(`Title: ${issueData.title}\n\nDescription:\n${issueData.body || 'No description provided'}`).catch(() => []);
const content = messages?.pop()?.content;
if(!content) {
console.log('Invalid response from AI');