@eldrforge/kodrdriv 0.0.14 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -9
- package/dist/arguments.js +306 -55
- package/dist/arguments.js.map +1 -1
- package/dist/audio/devices.js +284 -0
- package/dist/audio/devices.js.map +1 -0
- package/dist/audio/index.js +31 -0
- package/dist/audio/index.js.map +1 -0
- package/dist/audio/processor.js +766 -0
- package/dist/audio/processor.js.map +1 -0
- package/dist/audio/types.js +16 -0
- package/dist/audio/types.js.map +1 -0
- package/dist/audio/validation.js +35 -0
- package/dist/audio/validation.js.map +1 -0
- package/dist/commands/audio-commit.js +64 -248
- package/dist/commands/audio-commit.js.map +1 -1
- package/dist/commands/audio-review.js +90 -701
- package/dist/commands/audio-review.js.map +1 -1
- package/dist/commands/commit.js +18 -18
- package/dist/commands/commit.js.map +1 -1
- package/dist/commands/release.js +14 -15
- package/dist/commands/release.js.map +1 -1
- package/dist/commands/review.js +152 -0
- package/dist/commands/review.js.map +1 -0
- package/dist/commands/select-audio.js +265 -0
- package/dist/commands/select-audio.js.map +1 -0
- package/dist/constants.js +86 -68
- package/dist/constants.js.map +1 -1
- package/dist/content/diff.js +155 -1
- package/dist/content/diff.js.map +1 -1
- package/dist/content/issues.js +256 -0
- package/dist/content/issues.js.map +1 -0
- package/dist/content/releaseNotes.js +90 -0
- package/dist/content/releaseNotes.js.map +1 -0
- package/dist/main.js +9 -2
- package/dist/main.js.map +1 -1
- package/dist/prompt/instructions/commit.md +18 -15
- package/dist/prompt/instructions/release.md +6 -5
- package/dist/prompt/instructions/{audio-review.md → review.md} +24 -18
- package/dist/prompt/prompts.js +87 -19
- package/dist/prompt/prompts.js.map +1 -1
- package/dist/types.js +27 -3
- package/dist/types.js.map +1 -1
- package/dist/util/general.js +7 -1
- package/dist/util/general.js.map +1 -1
- package/dist/util/openai.js +34 -3
- package/dist/util/openai.js.map +1 -1
- package/dist/util/stdin.js +61 -0
- package/dist/util/stdin.js.map +1 -0
- package/package.json +6 -6
- package/.kodrdriv/config.yaml +0 -20
- package/.kodrdriv/context/content.md +0 -7
- package/RELEASE_NOTES.md +0 -14
- package/docs/index.html +0 -17
- package/docs/package.json +0 -36
- package/docs/pnpm-lock.yaml +0 -3441
- package/docs/public/README.md +0 -132
- package/docs/public/advanced-usage.md +0 -188
- package/docs/public/code-icon.svg +0 -4
- package/docs/public/commands.md +0 -116
- package/docs/public/configuration.md +0 -274
- package/docs/public/examples.md +0 -352
- package/docs/public/kodrdriv-logo.svg +0 -62
- package/docs/src/App.css +0 -387
- package/docs/src/App.tsx +0 -60
- package/docs/src/components/DocumentPage.tsx +0 -56
- package/docs/src/components/ErrorMessage.tsx +0 -15
- package/docs/src/components/LoadingSpinner.tsx +0 -14
- package/docs/src/components/MarkdownRenderer.tsx +0 -56
- package/docs/src/components/Navigation.css +0 -73
- package/docs/src/components/Navigation.tsx +0 -36
- package/docs/src/index.css +0 -61
- package/docs/src/main.tsx +0 -10
- package/docs/src/test/setup.ts +0 -1
- package/docs/src/vite-env.d.ts +0 -10
- package/docs/tsconfig.node.json +0 -13
- package/docs/vite.config.ts +0 -15
- package/docs/vitest.config.ts +0 -15
- package/eslint.config.mjs +0 -83
- package/nodemon.json +0 -14
- package/output/kodrdriv/250701-1442-release-notes.md +0 -3
- package/pnpm-workspace.yaml +0 -5
- package/tsconfig.tsbuildinfo +0 -1
- package/vite.config.ts +0 -90
- package/vitest.config.ts +0 -24
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"issues.js","sources":["../../src/content/issues.ts"],"sourcesContent":["import { getLogger } from '../logging';\nimport { getOpenIssues, createIssue } from '../util/github';\n\nexport interface Issue {\n title: string;\n description: string;\n priority: 'low' | 'medium' | 'high';\n category: 'ui' | 'content' | 'functionality' | 'accessibility' | 'performance' | 'other';\n suggestions?: string[];\n}\n\nexport interface ReviewResult {\n summary: string;\n totalIssues: number;\n issues: Issue[];\n}\n\n// Get GitHub issues content\nexport const get = async (options: { limit?: number } = {}): Promise<string> => {\n const logger = getLogger();\n const { limit = 20 } = options;\n\n try {\n logger.debug('Fetching open GitHub issues...');\n const issuesLimit = Math.min(limit, 20); // Cap at 20\n const githubIssues = await getOpenIssues(issuesLimit);\n\n if (githubIssues.trim()) {\n logger.debug('Added GitHub issues to context (%d characters)', githubIssues.length);\n return githubIssues;\n } else {\n logger.debug('No open GitHub issues found');\n return '';\n }\n } catch (error: any) {\n logger.warn('Failed to fetch GitHub issues: %s', error.message);\n return '';\n }\n};\n\n// Helper function to get user choice interactively\nasync function getUserChoice(prompt: string, choices: Array<{ key: string, label: string }>): Promise<string> {\n const logger = getLogger();\n\n logger.info(prompt);\n choices.forEach(choice => {\n logger.info(` [${choice.key}] ${choice.label}`);\n });\n logger.info('');\n\n return new Promise(resolve => {\n // Ensure stdin is referenced so the process doesn't exit while waiting for input\n if (typeof process.stdin.ref === 'function') {\n process.stdin.ref();\n }\n\n process.stdin.setRawMode(true);\n process.stdin.resume();\n process.stdin.on('data', (key) => {\n const keyStr = key.toString().toLowerCase();\n const choice = choices.find(c => c.key === keyStr);\n if (choice) {\n process.stdin.setRawMode(false);\n process.stdin.pause();\n // Detach stdin again now that we're done\n if (typeof process.stdin.unref === 'function') {\n process.stdin.unref();\n }\n logger.info(`Selected: ${choice.label}\\n`);\n resolve(choice.key);\n }\n });\n });\n}\n\n// Helper function to edit issue interactively\nasync function editIssueInteractively(issue: Issue): Promise<Issue> {\n const logger = getLogger();\n const readline = await import('readline');\n\n // Ensure stdin is referenced during readline interaction\n if (typeof process.stdin.ref === 'function') {\n process.stdin.ref();\n }\n\n const rl = readline.createInterface({\n input: process.stdin,\n output: process.stdout\n });\n\n const question = (prompt: string): Promise<string> => {\n return new Promise(resolve => {\n rl.question(prompt, resolve);\n });\n };\n\n try {\n logger.info('📝 Edit issue details (press Enter to keep current value):');\n\n const newTitle = await question(`Title [${issue.title}]: `);\n const newDescription = await question(`Description [${issue.description}]: `);\n const newPriority = await question(`Priority (low/medium/high) [${issue.priority}]: `);\n const newCategory = await question(`Category (ui/content/functionality/accessibility/performance/other) [${issue.category}]: `);\n\n const updatedIssue: Issue = {\n title: newTitle.trim() || issue.title,\n description: newDescription.trim() || issue.description,\n priority: (newPriority.trim() as any) || issue.priority,\n category: (newCategory.trim() as any) || issue.category,\n suggestions: issue.suggestions\n };\n\n logger.info('✅ Issue updated successfully');\n return updatedIssue;\n } finally {\n rl.close();\n // Detach stdin after interactive edit completes\n if (typeof process.stdin.unref === 'function') {\n process.stdin.unref();\n }\n }\n}\n\n// Helper function to format issue body for GitHub\nfunction formatIssueBody(issue: Issue): string {\n let body = `## Description\\n\\n${issue.description}\\n\\n`;\n\n body += `## Details\\n\\n`;\n body += `- **Priority:** ${issue.priority}\\n`;\n body += `- **Category:** ${issue.category}\\n`;\n body += `- **Source:** Review\\n\\n`;\n\n if (issue.suggestions && issue.suggestions.length > 0) {\n body += `## Suggestions\\n\\n`;\n issue.suggestions.forEach(suggestion => {\n body += `- ${suggestion}\\n`;\n });\n body += '\\n';\n }\n\n body += `---\\n\\n`;\n body += `*This issue was automatically created from a review session.*`;\n\n return body;\n}\n\n// Helper function to format results with created GitHub issues\nfunction formatReviewResultsWithIssues(\n result: ReviewResult,\n createdIssues: Array<{ issue: Issue, githubUrl: string, number: number }>\n): string {\n let output = `📝 Review Results\\n\\n`;\n output += `📋 Summary: ${result.summary}\\n`;\n output += `📊 Total Issues Found: ${result.totalIssues}\\n`;\n output += `🚀 GitHub Issues Created: ${createdIssues.length}\\n\\n`;\n\n if (result.issues && result.issues.length > 0) {\n output += `📝 Issues Identified:\\n\\n`;\n\n result.issues.forEach((issue, index) => {\n const priorityEmoji = issue.priority === 'high' ? '🔴' :\n issue.priority === 'medium' ? '🟡' : '🟢';\n const categoryEmoji = issue.category === 'ui' ? '🎨' :\n issue.category === 'content' ? '📝' :\n issue.category === 'functionality' ? '⚙️' :\n issue.category === 'accessibility' ? '♿' :\n issue.category === 'performance' ? '⚡' : '🔧';\n\n output += `${index + 1}. ${priorityEmoji} ${issue.title}\\n`;\n output += ` ${categoryEmoji} Category: ${issue.category} | Priority: ${issue.priority}\\n`;\n output += ` 📖 Description: ${issue.description}\\n`;\n\n // Check if this issue was created as a GitHub issue\n const createdIssue = createdIssues.find(ci => ci.issue === issue);\n if (createdIssue) {\n output += ` 🔗 GitHub Issue: #${createdIssue.number} - ${createdIssue.githubUrl}\\n`;\n }\n\n if (issue.suggestions && issue.suggestions.length > 0) {\n output += ` 💡 Suggestions:\\n`;\n issue.suggestions.forEach(suggestion => {\n output += ` • ${suggestion}\\n`;\n });\n }\n output += `\\n`;\n });\n } else {\n output += `✅ No specific issues identified from the review.\\n\\n`;\n }\n\n if (createdIssues.length > 0) {\n output += `\\n🎯 Created GitHub Issues:\\n`;\n createdIssues.forEach(createdIssue => {\n output += `• #${createdIssue.number}: ${createdIssue.issue.title} - ${createdIssue.githubUrl}\\n`;\n });\n output += `\\n`;\n }\n\n output += `🚀 Next Steps: Review the created GitHub issues and prioritize them in your development workflow.`;\n\n return output;\n}\n\nfunction formatReviewResults(result: ReviewResult): string {\n let output = `📝 Review Results\\n\\n`;\n output += `📋 Summary: ${result.summary}\\n`;\n output += `📊 Total Issues Found: ${result.totalIssues}\\n\\n`;\n\n if (result.issues && result.issues.length > 0) {\n output += `📝 Issues Identified:\\n\\n`;\n\n result.issues.forEach((issue, index) => {\n const priorityEmoji = issue.priority === 'high' ? '🔴' :\n issue.priority === 'medium' ? '🟡' : '🟢';\n const categoryEmoji = issue.category === 'ui' ? '🎨' :\n issue.category === 'content' ? '📝' :\n issue.category === 'functionality' ? '⚙️' :\n issue.category === 'accessibility' ? '♿' :\n issue.category === 'performance' ? '⚡' : '🔧';\n\n output += `${index + 1}. ${priorityEmoji} ${issue.title}\\n`;\n output += ` ${categoryEmoji} Category: ${issue.category} | Priority: ${issue.priority}\\n`;\n output += ` 📖 Description: ${issue.description}\\n`;\n\n if (issue.suggestions && issue.suggestions.length > 0) {\n output += ` 💡 Suggestions:\\n`;\n issue.suggestions.forEach(suggestion => {\n output += ` • ${suggestion}\\n`;\n });\n }\n output += `\\n`;\n });\n } else {\n output += `✅ No specific issues identified from the review.\\n\\n`;\n }\n\n output += `🚀 Next Steps: Review the identified issues and prioritize them for your development workflow.`;\n\n return output;\n}\n\n// Handle GitHub issue creation workflow\nexport const handleIssueCreation = async (\n result: ReviewResult,\n senditMode: boolean = false\n): Promise<string> => {\n const logger = getLogger();\n const createdIssues: Array<{ issue: Issue, githubUrl: string, number: number }> = [];\n\n if (!result.issues || result.issues.length === 0) {\n return formatReviewResults(result);\n }\n\n logger.info(`🔍 Found ${result.issues.length} issues to potentially create as GitHub issues`);\n\n for (let i = 0; i < result.issues.length; i++) {\n const issue = result.issues[i];\n let shouldCreateIssue = senditMode;\n\n if (!senditMode) {\n // Interactive confirmation for each issue\n logger.info(`\\n📋 Issue ${i + 1} of ${result.issues.length}:`);\n logger.info(` Title: ${issue.title}`);\n logger.info(` Priority: ${issue.priority} | Category: ${issue.category}`);\n logger.info(` Description: ${issue.description}`);\n if (issue.suggestions && issue.suggestions.length > 0) {\n logger.info(` Suggestions: ${issue.suggestions.join(', ')}`);\n }\n\n // Get user choice\n const choice = await getUserChoice('\\nWhat would you like to do with this issue?', [\n { key: 'c', label: 'Create GitHub issue' },\n { key: 's', label: 'Skip this issue' },\n { key: 'e', label: 'Edit issue details' }\n ]);\n\n if (choice === 'c') {\n shouldCreateIssue = true;\n } else if (choice === 'e') {\n // Allow user to edit the issue\n const editedIssue = await editIssueInteractively(issue);\n result.issues[i] = editedIssue;\n shouldCreateIssue = true;\n }\n // If choice is 's', shouldCreateIssue remains false\n }\n\n if (shouldCreateIssue) {\n try {\n logger.info(`🚀 Creating GitHub issue: \"${issue.title}\"`);\n\n // Format issue body with additional details\n const issueBody = formatIssueBody(issue);\n\n // Create labels based on priority and category\n const labels = [\n `priority-${issue.priority}`,\n `category-${issue.category}`,\n 'review'\n ];\n\n const createdIssue = await createIssue(issue.title, issueBody, labels);\n createdIssues.push({\n issue,\n githubUrl: createdIssue.html_url,\n number: createdIssue.number\n });\n\n logger.info(`✅ Created GitHub issue #${createdIssue.number}: ${createdIssue.html_url}`);\n } catch (error: any) {\n logger.error(`❌ Failed to create GitHub issue for \"${issue.title}\": ${error.message}`);\n }\n }\n }\n\n // Return formatted results\n if (createdIssues.length > 0) {\n return formatReviewResultsWithIssues(result, createdIssues);\n } else {\n return formatReviewResults(result);\n }\n}; "],"names":["get","options","logger","getLogger","limit","debug","issuesLimit","Math","min","githubIssues","getOpenIssues","trim","length","error","warn","message","getUserChoice","prompt","choices","info","forEach","choice","key","label","Promise","resolve","process","stdin","ref","setRawMode","resume","on","keyStr","toString","toLowerCase","find","c","pause","unref","editIssueInteractively","issue","readline","rl","createInterface","input","output","stdout","question","newTitle","title","newDescription","description","newPriority","priority","newCategory","category","updatedIssue","suggestions","close","formatIssueBody","body","suggestion","formatReviewResultsWithIssues","result","createdIssues","summary","totalIssues","issues","index","priorityEmoji","categoryEmoji","createdIssue","ci","number","githubUrl","formatReviewResults","handleIssueCreation","senditMode","i","shouldCreateIssue","join","editedIssue","issueBody","labels","createIssue","push","html_url"],"mappings":";;;AAiBA;AACO,MAAMA,GAAAA,GAAM,OAAOC,OAAAA,GAA8B,EAAE,GAAA;AACtD,IAAA,MAAMC,MAAAA,GAASC,SAAAA,EAAAA;AACf,IAAA,MAAM,EAAEC,KAAAA,GAAQ,EAAE,EAAE,GAAGH,OAAAA;IAEvB,IAAI;AACAC,QAAAA,MAAAA,CAAOG,KAAK,CAAC,gCAAA,CAAA;AACb,QAAA,MAAMC,cAAcC,IAAAA,CAAKC,GAAG,CAACJ,KAAAA,EAAO;QACpC,MAAMK,YAAAA,GAAe,MAAMC,aAAAA,CAAcJ,WAAAA,CAAAA;QAEzC,IAAIG,YAAAA,CAAaE,IAAI,EAAA,EAAI;AACrBT,YAAAA,MAAAA,CAAOG,KAAK,CAAC,gDAAA,EAAkDI,YAAA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AS,EAAE3C,KAAAA,CAAMa,QAAQ,CAAA,CAAE;AAC5B,oBAAA,CAAC,SAAS,EAAEb,KAAAA,CAAMe,QAAQ,CAAA,CAAE;AAC5B,oBAAA;AACH,iBAAA;AAED,gBAAA,MAAMgB,eAAe,MAAMa,WAAAA,CAAY5C,KAAAA,CAAMS,KAAK,EAAEiC,SAAAA,EAAWC,MAAAA,CAAAA;AAC/DnB,gBAAAA,aAAAA,CAAcqB,IAAI,CAAC;AACf7C,oBAAAA,KAAAA;AACAkC,oBAAAA,SAAAA,EAAWH,aAAae,QAAQ;AAChCb,oBAAAA,MAAAA,EAAQF,aAAaE;AACzB,iBAAA,CAAA;AAEAvE,gBAAAA,MAAAA,CAAOiB,IAAI,CAAC,CAAC,wBAAwB,EAAEoD,YAAAA,CAAaE,MAAM,CAAC,EAAE,EAAEF,YAAAA,CAAae,QAAQ,CAAA,CAAE,CAAA;AAC1F,aAAA,CAAE,OAAOzE,KAAAA,EAAY;AACjBX,gBAAAA,MAAAA,CAAOW,KAAK,CAAC,CAAC,qCAAqC,EAAE2B,KAAAA,CAAMS,KAAK,CAAC,GAAG,EAAEpC,KAAAA,CAAME,OAAO,CAAA,CAAE,CAAA;AACzF;AACJ;AACJ;;IAGA,IAAIiD,aAAAA,CAAcpD,MAAM,GAAG,CAAA,EAAG;AAC1B,QAAA,OAAOkD,8BAA8BC,MAAAA,EAAQC,aAAAA,CAAAA;KACjD,MAAO;AACH,QAAA,OAAOW,mBAAAA,CAAoBZ,MAAAA,CAAAA;AAC/B;AACJ;;;;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { getLogger } from '../logging.js';
|
|
2
|
+
import { getOctokit, getRepoDetails } from '../util/github.js';
|
|
3
|
+
|
|
4
|
+
// Function to truncate overly large content while preserving structure
|
|
5
|
+
const truncateContent = (content, maxLength = 3000)=>{
|
|
6
|
+
if (content.length <= maxLength) {
|
|
7
|
+
return content;
|
|
8
|
+
}
|
|
9
|
+
const lines = content.split('\n');
|
|
10
|
+
const truncatedLines = [];
|
|
11
|
+
let currentLength = 0;
|
|
12
|
+
for (const line of lines){
|
|
13
|
+
if (currentLength + line.length + 1 > maxLength) {
|
|
14
|
+
break;
|
|
15
|
+
}
|
|
16
|
+
truncatedLines.push(line);
|
|
17
|
+
currentLength += line.length + 1; // +1 for newline
|
|
18
|
+
}
|
|
19
|
+
truncatedLines.push('');
|
|
20
|
+
truncatedLines.push(`... [TRUNCATED: Original content was ${content.length} characters, showing first ${currentLength}] ...`);
|
|
21
|
+
return truncatedLines.join('\n');
|
|
22
|
+
};
|
|
23
|
+
// Function to fetch recent releases from GitHub API
|
|
24
|
+
const findRecentReleaseNotes = async (limit)=>{
|
|
25
|
+
const logger = getLogger();
|
|
26
|
+
const releaseNotes = [];
|
|
27
|
+
if (limit <= 0) {
|
|
28
|
+
return releaseNotes;
|
|
29
|
+
}
|
|
30
|
+
try {
|
|
31
|
+
const octokit = getOctokit();
|
|
32
|
+
const { owner, repo } = await getRepoDetails();
|
|
33
|
+
logger.debug(`Fetching up to ${limit} recent releases from GitHub...`);
|
|
34
|
+
const response = await octokit.repos.listReleases({
|
|
35
|
+
owner,
|
|
36
|
+
repo,
|
|
37
|
+
per_page: Math.min(limit, 100)
|
|
38
|
+
});
|
|
39
|
+
const releases = response.data;
|
|
40
|
+
if (releases.length === 0) {
|
|
41
|
+
logger.debug('No releases found in GitHub repository');
|
|
42
|
+
return releaseNotes;
|
|
43
|
+
}
|
|
44
|
+
for (const release of releases.slice(0, limit)){
|
|
45
|
+
const releaseContent = [
|
|
46
|
+
`# ${release.name || release.tag_name}`,
|
|
47
|
+
`**Tag:** ${release.tag_name}`,
|
|
48
|
+
`**Published:** ${release.published_at}`,
|
|
49
|
+
release.prerelease ? '**Type:** Pre-release' : '**Type:** Release',
|
|
50
|
+
release.draft ? '**Status:** Draft' : '**Status:** Published',
|
|
51
|
+
'',
|
|
52
|
+
release.body || 'No release notes provided'
|
|
53
|
+
].join('\n');
|
|
54
|
+
const truncatedContent = truncateContent(releaseContent);
|
|
55
|
+
releaseNotes.push(`=== GitHub Release: ${release.tag_name} ===\n${truncatedContent}`);
|
|
56
|
+
if (truncatedContent.length < releaseContent.length) {
|
|
57
|
+
logger.debug(`Found release ${release.tag_name} (%d characters, truncated from %d)`, truncatedContent.length, releaseContent.length);
|
|
58
|
+
} else {
|
|
59
|
+
logger.debug(`Found release ${release.tag_name} (%d characters)`, releaseContent.length);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
logger.debug(`Fetched ${releaseNotes.length} releases from GitHub`);
|
|
63
|
+
} catch (error) {
|
|
64
|
+
logger.warn('Error fetching releases from GitHub API: %s', error.message);
|
|
65
|
+
// If we have a GitHub API error, we could fall back to checking for local release notes
|
|
66
|
+
// This maintains some backward compatibility
|
|
67
|
+
logger.debug('Falling back to local RELEASE_NOTES.md file...');
|
|
68
|
+
try {
|
|
69
|
+
const fs = await import('fs/promises');
|
|
70
|
+
const content = await fs.readFile('RELEASE_NOTES.md', 'utf-8');
|
|
71
|
+
if (content.trim()) {
|
|
72
|
+
const truncatedContent = truncateContent(content);
|
|
73
|
+
releaseNotes.push(`=== Local RELEASE_NOTES.md ===\n${truncatedContent}`);
|
|
74
|
+
logger.debug(`Found local release notes (%d characters)`, content.length);
|
|
75
|
+
}
|
|
76
|
+
} catch {
|
|
77
|
+
// No local file either, return empty array
|
|
78
|
+
logger.debug('No local RELEASE_NOTES.md file found either');
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
return releaseNotes.slice(0, limit);
|
|
82
|
+
};
|
|
83
|
+
const get = async (options = {})=>{
|
|
84
|
+
const { limit = 3 } = options;
|
|
85
|
+
const releaseNotes = await findRecentReleaseNotes(limit);
|
|
86
|
+
return releaseNotes.join('\n\n');
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
export { findRecentReleaseNotes, get };
|
|
90
|
+
//# sourceMappingURL=releaseNotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"releaseNotes.js","sources":["../../src/content/releaseNotes.ts"],"sourcesContent":["import { getLogger } from '../logging';\nimport { getOctokit, getRepoDetails } from '../util/github';\n\n// Function to truncate overly large content while preserving structure\nconst truncateContent = (content: string, maxLength: number = 3000): string => {\n if (content.length <= maxLength) {\n return content;\n }\n\n const lines = content.split('\\n');\n const truncatedLines: string[] = [];\n let currentLength = 0;\n\n for (const line of lines) {\n if (currentLength + line.length + 1 > maxLength) {\n break;\n }\n truncatedLines.push(line);\n currentLength += line.length + 1; // +1 for newline\n }\n\n truncatedLines.push('');\n truncatedLines.push(`... [TRUNCATED: Original content was ${content.length} characters, showing first ${currentLength}] ...`);\n\n return truncatedLines.join('\\n');\n};\n\n// Function to fetch recent releases from GitHub API\nexport const findRecentReleaseNotes = async (limit: number): Promise<string[]> => {\n const logger = getLogger();\n const releaseNotes: string[] = [];\n\n if (limit <= 0) {\n return releaseNotes;\n }\n\n try {\n const octokit = getOctokit();\n const { owner, repo } = await getRepoDetails();\n\n logger.debug(`Fetching up to ${limit} recent releases from GitHub...`);\n\n const response = await octokit.repos.listReleases({\n owner,\n repo,\n per_page: Math.min(limit, 100), // GitHub API limit\n });\n\n const releases = response.data;\n\n if (releases.length === 0) {\n logger.debug('No releases found in GitHub repository');\n return releaseNotes;\n }\n\n for (const release of releases.slice(0, limit)) {\n const releaseContent = [\n `# ${release.name || release.tag_name}`,\n `**Tag:** ${release.tag_name}`,\n `**Published:** ${release.published_at}`,\n release.prerelease ? '**Type:** Pre-release' : '**Type:** Release',\n release.draft ? '**Status:** Draft' : '**Status:** Published',\n '',\n release.body || 'No release notes provided'\n ].join('\\n');\n\n const truncatedContent = truncateContent(releaseContent);\n releaseNotes.push(`=== GitHub Release: ${release.tag_name} ===\\n${truncatedContent}`);\n\n if (truncatedContent.length < releaseContent.length) {\n logger.debug(`Found release ${release.tag_name} (%d characters, truncated from %d)`,\n truncatedContent.length, releaseContent.length);\n } else {\n logger.debug(`Found release ${release.tag_name} (%d characters)`, releaseContent.length);\n }\n }\n\n logger.debug(`Fetched ${releaseNotes.length} releases from GitHub`);\n\n } catch (error: any) {\n logger.warn('Error fetching releases from GitHub API: %s', error.message);\n\n // If we have a GitHub API error, we could fall back to checking for local release notes\n // This maintains some backward compatibility\n logger.debug('Falling back to local RELEASE_NOTES.md file...');\n try {\n const fs = await import('fs/promises');\n const content = await fs.readFile('RELEASE_NOTES.md', 'utf-8');\n if (content.trim()) {\n const truncatedContent = truncateContent(content);\n releaseNotes.push(`=== Local RELEASE_NOTES.md ===\\n${truncatedContent}`);\n logger.debug(`Found local release notes (%d characters)`, content.length);\n }\n } catch {\n // No local file either, return empty array\n logger.debug('No local RELEASE_NOTES.md file found either');\n }\n }\n\n return releaseNotes.slice(0, limit);\n};\n\nexport const get = async (options: { limit?: number } = {}): Promise<string> => {\n const { limit = 3 } = options;\n const releaseNotes = await findRecentReleaseNotes(limit);\n return releaseNotes.join('\\n\\n');\n}; "],"names":["truncateContent","content","maxLength","length","lines","split","truncatedLines","currentLength","line","push","join","findRecentReleaseNotes","limit","logger","getLogger","releaseNotes","octokit","getOctokit","owner","repo","getRepoDetails","debug","response","repos","listReleases","per_page","Math","min","releases","data","release","slice","releaseContent","name","tag_name","published_at","prerelease","draft","body","truncatedContent","error","warn","message","fs","readFile","trim","get","options"],"mappings":";;;AAGA;AACA,MAAMA,eAAAA,GAAkB,CAACC,OAAAA,EAAiBC,SAAAA,GAAoB,IAAI,GAAA;IAC9D,IAAID,OAAAA,CAAQE,MAAM,IAAID,SAAAA,EAAW;QAC7B,OAAOD,OAAAA;AACX;IAEA,MAAMG,KAAAA,GAAQH,OAAAA,CAAQI,KAAK,CAAC,IAAA,CAAA;AAC5B,IAAA,MAAMC,iBAA2B,EAAE;AACnC,IAAA,IAAIC,aAAAA,GAAgB,CAAA;IAEpB,KAAK,MAAMC,QAAQJ,KAAAA,CAAO;AACtB,QAAA,IAAIG,aAAAA,GAAgBC,IAAAA,CAAKL,MAAM,GAAG,IAAID,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AAqB,CAAC,CAAA;AAEtE,KAAA,CAAE,OAAOqC,KAAAA,EAAY;AACjB3B,QAAAA,MAAAA,CAAO4B,IAAI,CAAC,6CAAA,EAA+CD,KAAAA,CAAME,OAAO,CAAA;;;AAIxE7B,QAAAA,MAAAA,CAAOQ,KAAK,CAAC,gDAAA,CAAA;QACb,IAAI;YACA,MAAMsB,EAAAA,GAAK,MAAM,OAAO,aAAA,CAAA;AACxB,YAAA,MAAM1C,OAAAA,GAAU,MAAM0C,EAAAA,CAAGC,QAAQ,CAAC,kBAAA,EAAoB,OAAA,CAAA;YACtD,IAAI3C,OAAAA,CAAQ4C,IAAI,EAAA,EAAI;AAChB,gBAAA,MAAMN,mBAAmBvC,eAAAA,CAAgBC,OAAAA,CAAAA;AACzCc,gBAAAA,YAAAA,CAAaN,IAAI,CAAC,CAAC,gCAAgC,EAAE8B,gBAAAA,CAAAA,CAAkB,CAAA;AACvE1B,gBAAAA,MAAAA,CAAOQ,KAAK,CAAC,CAAC,yCAAyC,CAAC,EAAEpB,QAAQE,MAAM,CAAA;AAC5E;AACJ,SAAA,CAAE,OAAM;;AAEJU,YAAAA,MAAAA,CAAOQ,KAAK,CAAC,6CAAA,CAAA;AACjB;AACJ;IAEA,OAAON,YAAAA,CAAagB,KAAK,CAAC,CAAA,EAAGnB,KAAAA,CAAAA;AACjC;AAEO,MAAMkC,GAAAA,GAAM,OAAOC,OAAAA,GAA8B,EAAE,GAAA;AACtD,IAAA,MAAM,EAAEnC,KAAAA,GAAQ,CAAC,EAAE,GAAGmC,OAAAA;IACtB,MAAMhC,YAAAA,GAAe,MAAMJ,sBAAAA,CAAuBC,KAAAA,CAAAA;IAClD,OAAOG,YAAAA,CAAaL,IAAI,CAAC,MAAA,CAAA;AAC7B;;;;"}
|
package/dist/main.js
CHANGED
|
@@ -9,8 +9,10 @@ import { execute } from './commands/commit.js';
|
|
|
9
9
|
import { execute as execute$4 } from './commands/link.js';
|
|
10
10
|
import { execute as execute$3 } from './commands/publish.js';
|
|
11
11
|
import { execute as execute$2 } from './commands/release.js';
|
|
12
|
+
import { execute as execute$8 } from './commands/review.js';
|
|
13
|
+
import { execute as execute$9 } from './commands/select-audio.js';
|
|
12
14
|
import { execute as execute$5 } from './commands/unlink.js';
|
|
13
|
-
import { DEFAULT_CONFIG_DIR, COMMAND_CHECK_CONFIG, COMMAND_INIT_CONFIG, COMMAND_COMMIT, COMMAND_AUDIO_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_LINK, COMMAND_UNLINK, COMMAND_AUDIO_REVIEW, COMMAND_CLEAN } from './constants.js';
|
|
15
|
+
import { DEFAULT_CONFIG_DIR, COMMAND_CHECK_CONFIG, COMMAND_INIT_CONFIG, COMMAND_COMMIT, COMMAND_AUDIO_COMMIT, COMMAND_RELEASE, COMMAND_PUBLISH, COMMAND_LINK, COMMAND_UNLINK, COMMAND_AUDIO_REVIEW, COMMAND_CLEAN, COMMAND_REVIEW, COMMAND_SELECT_AUDIO } from './constants.js';
|
|
14
16
|
import { getLogger, setLogLevel } from './logging.js';
|
|
15
17
|
import { ConfigSchema } from './types.js';
|
|
16
18
|
|
|
@@ -83,7 +85,7 @@ async function main() {
|
|
|
83
85
|
const command = process.argv[2];
|
|
84
86
|
let commandName = commandConfig.commandName;
|
|
85
87
|
// If we have a specific command argument, use that
|
|
86
|
-
if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean') {
|
|
88
|
+
if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean' || command === 'review' || command === 'select-audio') {
|
|
87
89
|
commandName = command;
|
|
88
90
|
}
|
|
89
91
|
let summary = '';
|
|
@@ -105,6 +107,11 @@ async function main() {
|
|
|
105
107
|
} else if (commandName === COMMAND_CLEAN) {
|
|
106
108
|
await execute$7(runConfig);
|
|
107
109
|
summary = 'Output directory cleaned successfully.';
|
|
110
|
+
} else if (commandName === COMMAND_REVIEW) {
|
|
111
|
+
summary = await execute$8(runConfig);
|
|
112
|
+
} else if (commandName === COMMAND_SELECT_AUDIO) {
|
|
113
|
+
await execute$9(runConfig);
|
|
114
|
+
summary = 'Audio selection completed successfully.';
|
|
108
115
|
}
|
|
109
116
|
// eslint-disable-next-line no-console
|
|
110
117
|
console.log(`\n\n${summary}\n\n`);
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport * as Cardigantime from '@theunwalked/cardigantime';\nimport 'dotenv/config';\nimport * as Arguments from './arguments';\nimport * as AudioCommit from './commands/audio-commit';\nimport * as AudioReview from './commands/audio-review';\nimport * as Clean from './commands/clean';\nimport * as Commit from './commands/commit';\nimport * as Link from './commands/link';\nimport * as Publish from './commands/publish';\nimport * as Release from './commands/release';\nimport * as Unlink from './commands/unlink';\nimport { COMMAND_AUDIO_COMMIT, COMMAND_AUDIO_REVIEW, COMMAND_CHECK_CONFIG, COMMAND_CLEAN, COMMAND_COMMIT, COMMAND_INIT_CONFIG, COMMAND_LINK, COMMAND_PUBLISH, COMMAND_RELEASE, COMMAND_UNLINK, DEFAULT_CONFIG_DIR } from './constants';\nimport { getLogger, setLogLevel } from './logging';\nimport { CommandConfig } from 'types';\nimport { Config, ConfigSchema, SecureConfig } from './types';\n\n/**\n * Configure early logging based on command line flags.\n * \n * Hey we need this because we need to be able to debug CardiganTime.\n * This method checks for --verbose and --debug flags early in the process\n * before CardiganTime is configured, allowing us to capture debug output\n * from the CardiganTime initialization itself.\n */\nfunction configureEarlyLogging(): void {\n const hasVerbose = process.argv.includes('--verbose');\n const hasDebug = process.argv.includes('--debug');\n\n // Set log level based on early flag detection\n if (hasDebug) {\n setLogLevel('debug');\n } else if (hasVerbose) {\n setLogLevel('verbose');\n }\n}\n\nexport async function main() {\n // Configure logging early, before CardiganTime initialization\n configureEarlyLogging();\n\n const cardigantime = Cardigantime.create({\n defaults: {\n configDirectory: DEFAULT_CONFIG_DIR,\n // Move pathResolution INSIDE defaults\n pathResolution: {\n resolvePathArray: ['contextDirectories'], // Resolve contextDirectories array elements as paths\n },\n // Use fieldOverlaps instead of mergeStrategy, INSIDE defaults\n fieldOverlaps: {\n 'contextDirectories': 'prepend', // Use prepend strategy for contextDirectories array\n // Add other field overlap configurations as needed\n },\n },\n features: ['config', 'hierarchical'],\n configShape: ConfigSchema.shape, // No need for 'as any' now\n logger: getLogger(),\n }); // No need for 'as any' at the end\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [runConfig, secureConfig, commandConfig]: [Config, SecureConfig, CommandConfig] = await Arguments.configure(cardigantime); // Pass cardigantime instance\n\n // Set log level based on verbose flag\n if (runConfig.verbose) {\n setLogLevel('verbose');\n }\n if (runConfig.debug) {\n setLogLevel('debug');\n }\n\n const logger = getLogger();\n cardigantime.setLogger(logger);\n\n try {\n // Handle check-config command first\n if (commandConfig.commandName === COMMAND_CHECK_CONFIG) {\n // CardiganTime's checkConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Handle init-config command\n if (commandConfig.commandName === COMMAND_INIT_CONFIG) {\n // CardiganTime's initConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Get the command from Commander\n const command = process.argv[2];\n let commandName = commandConfig.commandName;\n\n // If we have a specific command argument, use that\n if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean') {\n commandName = command;\n }\n\n let summary: string = '';\n\n if (commandName === COMMAND_COMMIT) {\n summary = await Commit.execute(runConfig);\n } else if (commandName === COMMAND_AUDIO_COMMIT) {\n summary = await AudioCommit.execute(runConfig);\n } else if (commandName === COMMAND_RELEASE) {\n const releaseSummary = await Release.execute(runConfig);\n summary = `${releaseSummary.title}\\n\\n${releaseSummary.body}`;\n } else if (commandName === COMMAND_PUBLISH) {\n await Publish.execute(runConfig);\n } else if (commandName === COMMAND_LINK) {\n summary = await Link.execute(runConfig);\n } else if (commandName === COMMAND_UNLINK) {\n summary = await Unlink.execute(runConfig);\n } else if (commandName === COMMAND_AUDIO_REVIEW) {\n summary = await AudioReview.execute(runConfig);\n } else if (commandName === COMMAND_CLEAN) {\n await Clean.execute(runConfig);\n summary = 'Output directory cleaned successfully.';\n }\n\n // eslint-disable-next-line no-console\n console.log(`\\n\\n${summary}\\n\\n`);\n\n } catch (error: any) {\n logger.error('Exiting due to Error: %s, %s', error.message, error.stack);\n process.exit(1);\n }\n}\n\nmain();"],"names":["configureEarlyLogging","hasVerbose","process","argv","includes","hasDebug","setLogLevel","main","cardigantime","Cardigantime","create","defaults","configDirectory","DEFAULT_CONFIG_DIR","pathResolution","resolvePathArray","fieldOverlaps","features","configShape","ConfigSchema","shape","logger","getLogger","runConfig","secureConfig","commandConfig","Arguments","verbose","debug","setLogger","commandName","COMMAND_CHECK_CONFIG","COMMAND_INIT_CONFIG","command","summary","COMMAND_COMMIT","Commit","COMMAND_AUDIO_COMMIT","AudioCommit","COMMAND_RELEASE","releaseSummary","Release","title","body","COMMAND_PUBLISH","Publish","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","COMMAND_AUDIO_REVIEW","AudioReview","COMMAND_CLEAN","Clean","console","log","error","message","stack","exit"],"mappings":";;;;;;;;;;;;;;;;AAiBA,CAAA,CAAA,CAAA;;;;;;;AAOC,CAAA,CAAA,CAAA,CACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASA,qBAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACL,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,IAA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AA;;"}
|
|
1
|
+
{"version":3,"file":"main.js","sources":["../src/main.ts"],"sourcesContent":["#!/usr/bin/env node\nimport * as Cardigantime from '@theunwalked/cardigantime';\nimport 'dotenv/config';\nimport { CommandConfig } from 'types';\nimport * as Arguments from './arguments';\nimport * as AudioCommit from './commands/audio-commit';\nimport * as AudioReview from './commands/audio-review';\nimport * as Clean from './commands/clean';\nimport * as Commit from './commands/commit';\nimport * as Link from './commands/link';\nimport * as Publish from './commands/publish';\nimport * as Release from './commands/release';\nimport * as Review from './commands/review';\nimport * as SelectAudio from './commands/select-audio';\nimport * as Unlink from './commands/unlink';\nimport { COMMAND_AUDIO_COMMIT, COMMAND_AUDIO_REVIEW, COMMAND_CHECK_CONFIG, COMMAND_CLEAN, COMMAND_COMMIT, COMMAND_INIT_CONFIG, COMMAND_LINK, COMMAND_PUBLISH, COMMAND_RELEASE, COMMAND_REVIEW, COMMAND_SELECT_AUDIO, COMMAND_UNLINK, DEFAULT_CONFIG_DIR } from './constants';\nimport { getLogger, setLogLevel } from './logging';\nimport { Config, ConfigSchema, SecureConfig } from './types';\n\n/**\n * Configure early logging based on command line flags.\n * \n * Hey we need this because we need to be able to debug CardiganTime.\n * This method checks for --verbose and --debug flags early in the process\n * before CardiganTime is configured, allowing us to capture debug output\n * from the CardiganTime initialization itself.\n */\nfunction configureEarlyLogging(): void {\n const hasVerbose = process.argv.includes('--verbose');\n const hasDebug = process.argv.includes('--debug');\n\n // Set log level based on early flag detection\n if (hasDebug) {\n setLogLevel('debug');\n } else if (hasVerbose) {\n setLogLevel('verbose');\n }\n}\n\nexport async function main() {\n // Configure logging early, before CardiganTime initialization\n configureEarlyLogging();\n\n const cardigantime = Cardigantime.create({\n defaults: {\n configDirectory: DEFAULT_CONFIG_DIR,\n // Move pathResolution INSIDE defaults\n pathResolution: {\n resolvePathArray: ['contextDirectories'], // Resolve contextDirectories array elements as paths\n },\n // Use fieldOverlaps instead of mergeStrategy, INSIDE defaults\n fieldOverlaps: {\n 'contextDirectories': 'prepend', // Use prepend strategy for contextDirectories array\n // Add other field overlap configurations as needed\n },\n },\n features: ['config', 'hierarchical'],\n configShape: ConfigSchema.shape, // No need for 'as any' now\n logger: getLogger(),\n }); // No need for 'as any' at the end\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const [runConfig, secureConfig, commandConfig]: [Config, SecureConfig, CommandConfig] = await Arguments.configure(cardigantime); // Pass cardigantime instance\n\n // Set log level based on verbose flag\n if (runConfig.verbose) {\n setLogLevel('verbose');\n }\n if (runConfig.debug) {\n setLogLevel('debug');\n }\n\n const logger = getLogger();\n cardigantime.setLogger(logger);\n\n try {\n // Handle check-config command first\n if (commandConfig.commandName === COMMAND_CHECK_CONFIG) {\n // CardiganTime's checkConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Handle init-config command\n if (commandConfig.commandName === COMMAND_INIT_CONFIG) {\n // CardiganTime's initConfig has already been called in Arguments.configure()\n // No additional processing needed here\n return;\n }\n\n // Get the command from Commander\n const command = process.argv[2];\n let commandName = commandConfig.commandName;\n\n // If we have a specific command argument, use that\n if (command === 'commit' || command === 'audio-commit' || command === 'release' || command === 'publish' || command === 'link' || command === 'unlink' || command === 'audio-review' || command === 'clean' || command === 'review' || command === 'select-audio') {\n commandName = command;\n }\n\n let summary: string = '';\n\n if (commandName === COMMAND_COMMIT) {\n summary = await Commit.execute(runConfig);\n } else if (commandName === COMMAND_AUDIO_COMMIT) {\n summary = await AudioCommit.execute(runConfig);\n } else if (commandName === COMMAND_RELEASE) {\n const releaseSummary = await Release.execute(runConfig);\n summary = `${releaseSummary.title}\\n\\n${releaseSummary.body}`;\n } else if (commandName === COMMAND_PUBLISH) {\n await Publish.execute(runConfig);\n } else if (commandName === COMMAND_LINK) {\n summary = await Link.execute(runConfig);\n } else if (commandName === COMMAND_UNLINK) {\n summary = await Unlink.execute(runConfig);\n } else if (commandName === COMMAND_AUDIO_REVIEW) {\n summary = await AudioReview.execute(runConfig);\n } else if (commandName === COMMAND_CLEAN) {\n await Clean.execute(runConfig);\n summary = 'Output directory cleaned successfully.';\n } else if (commandName === COMMAND_REVIEW) {\n summary = await Review.execute(runConfig);\n } else if (commandName === COMMAND_SELECT_AUDIO) {\n await SelectAudio.execute(runConfig);\n summary = 'Audio selection completed successfully.';\n }\n\n // eslint-disable-next-line no-console\n console.log(`\\n\\n${summary}\\n\\n`);\n\n } catch (error: any) {\n logger.error('Exiting due to Error: %s, %s', error.message, error.stack);\n process.exit(1);\n }\n}\n\nmain();"],"names":["configureEarlyLogging","hasVerbose","process","argv","includes","hasDebug","setLogLevel","main","cardigantime","Cardigantime","create","defaults","configDirectory","DEFAULT_CONFIG_DIR","pathResolution","resolvePathArray","fieldOverlaps","features","configShape","ConfigSchema","shape","logger","getLogger","runConfig","secureConfig","commandConfig","Arguments","verbose","debug","setLogger","commandName","COMMAND_CHECK_CONFIG","COMMAND_INIT_CONFIG","command","summary","COMMAND_COMMIT","Commit","COMMAND_AUDIO_COMMIT","AudioCommit","COMMAND_RELEASE","releaseSummary","Release","title","body","COMMAND_PUBLISH","Publish","COMMAND_LINK","Link","COMMAND_UNLINK","Unlink","COMMAND_AUDIO_REVIEW","AudioReview","COMMAND_CLEAN","Clean","COMMAND_REVIEW","Review","COMMAND_SELECT_AUDIO","SelectAudio","console","log","error","message","stack","exit"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,CAAA,CAAA,CAAA;;;;;;;AAOC,CAAA,CAAA,CAAA,CACD,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAASA,qBAAAA,CAAAA,CAAAA,CAAAA,CAAAA;AACL,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAaC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQC,IAAI,CA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A,CAAAA,CAAQ,CAAA,CAAA,CAAA,CAAI,CAAC,CAAA,CAAA;AAEpC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAO0B,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAY,CAAA;AACjBvC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAOuC,CAAAA,CAAAA,CAAAA,CAAAA,CAAK,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgCA,CAAAA,CAAAA,CAAAA,CAAAA,EAAMC,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAO,CAAA,CAAED,CAAAA,CAAAA,CAAAA,CAAAA,EAAME,KAAK,CAAA,CAAA;AACvE5D,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAQ6D,CAAAA,CAAAA,CAAAA,CAAI,CAAC,CAAA,CAAA,CAAA;AACjB,CAAA,CAAA,CAAA,CAAA,CAAA;AACJ,CAAA;AAEAxD,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA,CAAAA;;"}
|
|
@@ -1,14 +1,11 @@
|
|
|
1
|
-
Here is a revised version of your prompt — retaining all original structure and detail, but improving clarity, precision, and flow. It avoids redundancy, tightens the language, and better emphasizes key steps:
|
|
2
|
-
|
|
3
|
-
---
|
|
4
|
-
|
|
5
1
|
**🔧 Task Definition**
|
|
6
2
|
|
|
7
|
-
You are generating a Git commit message based on the content provided below. The content contains
|
|
3
|
+
You are generating a Git commit message based on the content provided below. The content contains several critical sections:
|
|
8
4
|
|
|
9
|
-
* **\[User
|
|
10
|
-
* **\[
|
|
11
|
-
* **\[
|
|
5
|
+
* **\[User Direction]** — When present, this is the PRIMARY guidance for your commit message focus. This describes the motivation, goals, or intent behind the change from the user's perspective. This should be the starting point and main theme of your commit message.
|
|
6
|
+
* **\[User Context]** — When present, this provides IMPORTANT additional context about the user's situation, environment, or background that should inform your commit message understanding and approach.
|
|
7
|
+
* **\[Diff]** — A code diff representing the actual modifications. Analyze this to understand *what* was changed. **THIS IS THE CURRENT CHANGE YOU ARE DESCRIBING** — focus your commit message on explaining these specific modifications.
|
|
8
|
+
* **\[Log Context]** — A short history of recent commit messages. **IMPORTANT: This is provided ONLY for background context and temporal continuity. DO NOT use this to drive your commit message focus or content. DO NOT describe previous commits or reference past changes. Your commit message should describe ONLY the current diff/change.**
|
|
12
9
|
|
|
13
10
|
---
|
|
14
11
|
|
|
@@ -16,19 +13,25 @@ You are generating a Git commit message based on the content provided below. The
|
|
|
16
13
|
|
|
17
14
|
### ✅ DO:
|
|
18
15
|
|
|
19
|
-
*
|
|
16
|
+
* **PRIORITIZE User Direction**: If `[User Direction]` is provided, make it the central theme and starting point of your commit message. Let it guide the narrative and focus.
|
|
17
|
+
* **CONSIDER User Context**: If `[User Context]` is provided, use it to inform your understanding and tailor your commit message appropriately to the user's situation.
|
|
18
|
+
* **FOCUS ON THE CURRENT CHANGE**: Your commit message should describe only what is happening in the current diff — not previous work or future plans.
|
|
19
|
+
* Start with a **clear, concise summary** of what was changed and why — grounded in the `User Direction` when present and informed by any `User Context`.
|
|
20
20
|
* **Group changes logically** by purpose or domain (e.g., "error handling cleanup", "refactored tests", "adjusted CI config").
|
|
21
|
-
* **Refer to specific changes** seen in the `Diff`, and explain why those changes matter when it
|
|
21
|
+
* **Refer to specific changes** seen in the `Diff`, and explain why those changes matter when it's non-obvious.
|
|
22
22
|
* If the change is large, **add one or two paragraphs** expanding on the most important elements.
|
|
23
23
|
* Keep the tone technical and direct — written for a fellow developer who will read this in six months.
|
|
24
24
|
|
|
25
25
|
### ❌ DO NOT:
|
|
26
26
|
|
|
27
|
-
* ❌ Don
|
|
28
|
-
* ❌ Don
|
|
29
|
-
* ❌ Don
|
|
30
|
-
* ❌ Don
|
|
31
|
-
* ❌ Don
|
|
27
|
+
* ❌ Don't describe the project or its general purpose.
|
|
28
|
+
* ❌ Don't begin with boilerplate like "This commit includes..." or "The following changes..."
|
|
29
|
+
* ❌ Don't use fluffy or celebratory language ("awesome update", "great enhancement").
|
|
30
|
+
* ❌ Don't end with vague statements like "improves experience" unless clearly supported by the change.
|
|
31
|
+
* ❌ Don't use markdown formatting — the output should be plain text only.
|
|
32
|
+
* ❌ **Don't reference or describe previous commits from the log context** — focus only on the current change.
|
|
33
|
+
* ❌ **Don't let the log context influence your commit message content** — it's background information only.
|
|
34
|
+
* ❌ **Don't continue themes or patterns from previous commits** unless they're directly relevant to the current diff.
|
|
32
35
|
|
|
33
36
|
---
|
|
34
37
|
|
|
@@ -2,7 +2,7 @@ Task #1: Write release notes by reading all of the log messages from this releas
|
|
|
2
2
|
|
|
3
3
|
Task #2: Provide a detailed list of changes involved in this release, and make sure that the release notes are directly related to the content in the log messages.
|
|
4
4
|
|
|
5
|
-
Task #3: Use the content in the
|
|
5
|
+
Task #3: Use the content in the Release Focus section as the PRIMARY GUIDE for writing the release notes and to help make connections with people, projects, issues, features, and other information. The Release Focus should heavily influence the tone, emphasis, and structure of your release notes.
|
|
6
6
|
|
|
7
7
|
### Output Format
|
|
8
8
|
|
|
@@ -41,13 +41,14 @@ Create release notes that:
|
|
|
41
41
|
|
|
42
42
|
## 🧭 Instructions
|
|
43
43
|
|
|
44
|
-
1. **Use the "
|
|
44
|
+
1. **Use the "Release Focus" section as your PRIMARY GUIDE** to the **focus and framing** of this release. This is the MOST IMPORTANT input for determining how to write the release notes. The Release Focus may include:
|
|
45
45
|
|
|
46
46
|
* The theme or reason behind the release (e.g., "we're cleaning up configuration files", "this is about improving test stability")
|
|
47
47
|
* Key goals or constraints
|
|
48
48
|
* Target audiences or known issues being addressed
|
|
49
|
+
* Strategic direction or priorities for this release
|
|
49
50
|
|
|
50
|
-
|
|
51
|
+
🎯 **CRITICAL**: The Release Focus should shape the **opening paragraph**, determine which changes are emphasized most prominently, and guide the overall narrative of the release notes. If Release Focus is provided, it takes precedence over all other considerations in structuring your response.
|
|
51
52
|
|
|
52
53
|
2. **Structure the release notes as follows:**
|
|
53
54
|
|
|
@@ -84,7 +85,7 @@ Create release notes that:
|
|
|
84
85
|
|
|
85
86
|
```json
|
|
86
87
|
{
|
|
87
|
-
"title": "
|
|
88
|
-
"body": "This release focuses on simplifying the configuration system and removing deprecated environment-specific files. Based on
|
|
88
|
+
"title": "Configuration System Simplification and Developer Experience Improvements",
|
|
89
|
+
"body": "This release focuses on simplifying the configuration system and removing deprecated environment-specific files. Based on the Release Focus of improving developer onboarding and standardizing build behavior, the team prioritized changes that reduce friction for new developers and standardize build behavior across local and CI environments.\\n\\n**Improvements**\\n\\n* Unified `vite.config.ts` and `webpack.config.js` into a single environment-aware module\\n* Reduced config nesting depth in `tsconfig.json` to improve readability\\n* Updated CI scripts to use `.env.defaults` instead of `.env.local`\\n\\n**Bug Fixes**\\n\\n* Fixed crash in config loader when optional fields were undefined\\n* Resolved issue with `yarn build` failing on Windows due to missing path escape\\n\\n**Documentation Updates**\\n\\n* Rewrote setup instructions in `README.md` to reflect unified config process\\n* Removed legacy instructions for `env.local.js`"
|
|
89
90
|
}
|
|
90
91
|
```
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
**🔧 Task Definition**
|
|
2
2
|
|
|
3
|
-
You are analyzing
|
|
3
|
+
You are analyzing review notes about a software project. Your task is to extract specific, actionable issues that can be addressed by the development team.
|
|
4
4
|
|
|
5
5
|
The content contains:
|
|
6
6
|
|
|
7
|
-
* **\[
|
|
8
|
-
* **\[
|
|
7
|
+
* **\[Review Notes]** — Feedback that may include observations, criticisms, suggestions, or general commentary about the project.
|
|
8
|
+
* **\[User Context]** — **IMPORTANT**: Critical background information about the project including recent commits, diffs, release notes, and open GitHub issues. This context is essential for understanding the current state of the project and providing informed analysis.
|
|
9
9
|
|
|
10
10
|
---
|
|
11
11
|
|
|
@@ -50,31 +50,37 @@ You **MUST** respond with valid JSON in this exact format:
|
|
|
50
50
|
|
|
51
51
|
---
|
|
52
52
|
|
|
53
|
-
## ⚠️ IMPORTANT:
|
|
53
|
+
## ⚠️ IMPORTANT: Using Review Notes and User Context
|
|
54
54
|
|
|
55
|
-
**CRITICAL
|
|
55
|
+
**CRITICAL APPROACH:**
|
|
56
56
|
|
|
57
|
-
* **
|
|
58
|
-
* **
|
|
57
|
+
* **Review Notes** — This is the PRIMARY source you should use to extract issues. The feedback provided here should generate actionable items.
|
|
58
|
+
* **User Context** — **ESSENTIAL for informed analysis**: This provides crucial background information that you MUST consider when analyzing the review notes. Use this context to:
|
|
59
|
+
- Understand the current state of the project
|
|
60
|
+
- Avoid duplicating existing known issues
|
|
61
|
+
- Provide more accurate prioritization
|
|
62
|
+
- Suggest solutions that align with recent development work
|
|
63
|
+
- Understand the broader project goals and constraints
|
|
59
64
|
|
|
60
|
-
**If the
|
|
65
|
+
**If the review notes are empty, blank, or contain no actionable feedback:**
|
|
61
66
|
* Return `"totalIssues": 0` and `"issues": []`
|
|
62
|
-
* Do NOT generate issues from context
|
|
63
|
-
* Context is for understanding, NOT for creating tasks
|
|
67
|
+
* Do NOT generate issues from context alone when no review feedback is provided
|
|
64
68
|
|
|
65
69
|
**Avoiding Duplicate Issues:**
|
|
66
|
-
* If the
|
|
70
|
+
* **CRITICALLY IMPORTANT**: If the User Context includes open GitHub issues, review them carefully
|
|
67
71
|
* Do NOT create new issues for problems that are already documented in existing issues
|
|
68
|
-
* Only create issues for NEW problems mentioned in the
|
|
69
|
-
* If
|
|
72
|
+
* Only create issues for NEW problems mentioned in the review notes that are not already covered
|
|
73
|
+
* If a review issue is similar to an existing one but has new details, you may create it but note the relationship
|
|
74
|
+
* Use the User Context to understand what work is already planned or in progress
|
|
70
75
|
|
|
71
76
|
---
|
|
72
77
|
|
|
73
78
|
## ✅ DO:
|
|
74
79
|
|
|
75
|
-
* **Extract specific, actionable issues** mentioned in the
|
|
76
|
-
* **
|
|
77
|
-
* **
|
|
80
|
+
* **Extract specific, actionable issues** mentioned in the review notes
|
|
81
|
+
* **Leverage User Context** to provide informed analysis and avoid duplicates
|
|
82
|
+
* **Provide clear, implementable suggestions** for fixes that consider the current project state
|
|
83
|
+
* **Use appropriate categories and priorities** based on impact and context
|
|
78
84
|
* **Focus on concrete problems** that can be addressed by developers
|
|
79
85
|
* **Include enough detail** in descriptions for developers to understand the issue
|
|
80
86
|
|
|
@@ -82,7 +88,7 @@ You **MUST** respond with valid JSON in this exact format:
|
|
|
82
88
|
|
|
83
89
|
* ❌ Include vague or non-actionable feedback
|
|
84
90
|
* ❌ Create issues for purely subjective preferences without clear rationale
|
|
85
|
-
* ❌
|
|
91
|
+
* ❌ Ignore the User Context when analyzing review notes
|
|
86
92
|
* ❌ Include commentary that doesn't translate to specific improvements
|
|
87
93
|
* ❌ Use any format other than the required JSON structure
|
|
88
94
|
|
|
@@ -99,4 +105,4 @@ Prioritize feedback that relates to:
|
|
|
99
105
|
* Content clarity or accuracy
|
|
100
106
|
* Visual design issues that affect usability
|
|
101
107
|
|
|
102
|
-
Remember: Your goal is to help the development team understand what specific actions they can take to improve the project based on the
|
|
108
|
+
Remember: Your goal is to help the development team understand what specific actions they can take to improve the project based on the review feedback, informed by the current project context.
|