@polka-codes/cli 0.9.24 → 0.9.25

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.
Files changed (2) hide show
  1. package/dist/index.js +42 -26
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -58572,7 +58572,7 @@ var {
58572
58572
  Help
58573
58573
  } = import__.default;
58574
58574
  // package.json
58575
- var version = "0.9.24";
58575
+ var version = "0.9.25";
58576
58576
 
58577
58577
  // src/commands/chat.ts
58578
58578
  import { readFile as readFile3 } from "node:fs/promises";
@@ -97959,7 +97959,7 @@ var toolInfo15 = {
97959
97959
  return val;
97960
97960
  }, exports_external.boolean().optional().default(false)).describe("Get staged changes instead of unstaged changes."),
97961
97961
  commitRange: exports_external.string().optional().describe('The commit range to get the diff for (e.g., "main...HEAD").'),
97962
- file: exports_external.string().optional().describe("Get the diff for a specific file."),
97962
+ file: exports_external.string().describe("Get the diff for a specific file."),
97963
97963
  contextLines: exports_external.coerce.number().optional().default(5).describe("Number of context lines to include around changes."),
97964
97964
  includeLineNumbers: exports_external.preprocess((val) => {
97965
97965
  if (typeof val === "string") {
@@ -98056,42 +98056,58 @@ var prompt5 = `
98056
98056
  You are a senior software engineer reviewing code changes.
98057
98057
 
98058
98058
  ## Critical Instructions
98059
- **ONLY review the actual changes shown in the diff.** Do not comment on existing code that wasn't modified.
98059
+ - **ONLY review the actual changes shown in the diff.** Do not comment on existing code that wasn't modified.
98060
+ - **ONLY run git_diff on files that are reviewable source/config files** per the "File Selection for git_diff" rules below. Do not pass excluded files to git_diff.
98061
+
98062
+ ## File Selection for git_diff
98063
+ Use <file_status> to decide which files to diff. Include only files likely to contain human-authored source or meaningful configuration.
98064
+
98065
+ Include (run git_diff):
98066
+ - Application/source code
98067
+ - UI/templates/assets code
98068
+ - Infra/config that affects behavior
98069
+
98070
+ Exclude (do NOT run git_diff; do not review):
98071
+ - Lockfiles
98072
+ - Generated/build artifacts & deps
98073
+ - Test artifacts/snapshots
98074
+ - Data and fixtures
98075
+ - Binary/media/minified/maps
98060
98076
 
98061
98077
  ## Viewing Changes
98062
- - **Use git_diff** to inspect the actual code changes for each relevant file.
98063
- - **Pull request**: use the provided commit range for the git_diff tool with contextLines: 5 and includeLineNumbers: true
98064
- - **Local changes**: diff staged or unstaged files using the git_diff tool with contextLines: 5 and includeLineNumbers: true
98065
- - The diff will include line number annotations: [Line N] for additions and [Line N removed] for deletions
98066
- - If a pull request is present you may receive:
98078
+ - For each included file, **use git_diff** to inspect the actual code changes:
98079
+ - **Pull request:** use the provided commit range for the git_diff tool with contextLines: 5 and includeLineNumbers: true, but only surface and review the included files.
98080
+ - **Local changes:** diff staged or unstaged included files using git_diff with contextLines: 5 and includeLineNumbers: true.
98081
+ - The diff will include line number annotations: [Line N] for additions and [Line N removed] for deletions.
98082
+ - You may receive:
98067
98083
  - <pr_title>
98068
98084
  - <pr_description>
98069
98085
  - <commit_messages>
98070
98086
  - A <review_instructions> tag tells you the focus of the review.
98071
- - File status information is provided in <file_status> - use this to understand which files were modified, added, deleted, or renamed.
98087
+ - Use <file_status> to understand which files were modified, added, deleted, or renamed and to apply the inclusion/exclusion rules above.
98072
98088
 
98073
98089
  ## Line Number Reporting
98074
- - **IMPORTANT**: Use the line numbers from the annotations in the diff output
98075
- - For additions: Look for [Line N] annotations after the + lines
98076
- - For deletions: Look for [Line N removed] annotations after the - lines
98077
- - For modifications: Report the line number of the new/current code (from [Line N] annotations)
98078
- - Report single lines as "N" and ranges as "N-M"
98090
+ - Use the line numbers from the annotations in the diff output.
98091
+ - For additions: use the number from the [Line N] annotation after the + line.
98092
+ - For deletions: use the number from the [Line N removed] annotation after the - line.
98093
+ - For modifications: report the line number of the new/current code (from [Line N]).
98094
+ - Report single lines as "N" and ranges as "N-M".
98079
98095
 
98080
98096
  ## Review Guidelines
98081
98097
  Focus exclusively on the changed lines (+ additions, - deletions, modified lines):
98082
- - **Specific issues**: Point to exact problems in the changed code with accurate line references from the annotations
98083
- - **Actionable fixes**: Provide concrete solutions, not vague suggestions
98084
- - **Clear reasoning**: Explain why each issue matters and how to fix it
98085
- - **Avoid generic advice**: No generic suggestions like "add more tests", "improve documentation", or "follow best practices" unless directly related to a specific problem in the diff
98098
+ - **Specific issues:** Point to exact problems in the changed code with accurate line references from the annotations.
98099
+ - **Actionable fixes:** Provide concrete solutions, not vague suggestions.
98100
+ - **Clear reasoning:** Explain why each issue matters and how to fix it.
98101
+ - **Avoid generic advice** unless directly tied to a specific problem visible in the diff.
98086
98102
 
98087
98103
  ## What NOT to review
98088
- - Existing unchanged code
98089
- - Overall project structure or architecture (unless directly impacted by changes)
98090
- - Generic best practices unrelated to the specific changes
98091
- - Missing features or functionality not part of this diff
98104
+ - Files excluded by the "File Selection for git_diff" rules (do not diff or comment on them).
98105
+ - Existing unchanged code.
98106
+ - Overall project structure/architecture unless directly impacted by the changes.
98107
+ - Missing features or functionality not part of this diff.
98092
98108
 
98093
98109
  ## Output Format
98094
- Do **not** include praise or positive feedback. Ignore generated files such as lock files.
98110
+ Do not include praise or positive feedback.
98095
98111
  Only include reviews for actual issues found in the changed code.
98096
98112
 
98097
98113
  Return your review as a JSON object inside a \`\`\`json block, wrapped like:
@@ -98099,7 +98115,7 @@ Return your review as a JSON object inside a \`\`\`json block, wrapped like:
98099
98115
  <tool_parameter_result>
98100
98116
  \`\`\`json
98101
98117
  {
98102
- "overview": "Summary of specific issues found in the diff changes, or 'No issues found' if the changes look good.",
98118
+ "overview": "Summary of specific issues found in the diff changes, 'No issues found', or 'No reviewable changes' if all modified files were excluded.",
98103
98119
  "specificReviews": [
98104
98120
  {
98105
98121
  "file": "path/filename.ext",
@@ -116696,7 +116712,7 @@ async function runTask(taskArg, _options, command) {
116696
116712
  console.log();
116697
116713
  runner.printUsage();
116698
116714
  }
116699
- process.exit(0);
116715
+ process.exit(130);
116700
116716
  };
116701
116717
  process.on("SIGINT", sigintHandler);
116702
116718
  const fileContents = [];
@@ -117000,7 +117016,7 @@ async function handleReviewResult(result, isJsonOutput, command) {
117000
117016
  default: false
117001
117017
  });
117002
117018
  } catch {
117003
- process.exit(0);
117019
+ process.exit(130);
117004
117020
  }
117005
117021
  }
117006
117022
  if (shouldRunTask) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polka-codes/cli",
3
- "version": "0.9.24",
3
+ "version": "0.9.25",
4
4
  "license": "AGPL-3.0",
5
5
  "author": "github@polka.codes",
6
6
  "type": "module",