@hasna/terminal 2.0.1 → 2.0.2
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/dist/ai.js +4 -1
- package/package.json +1 -1
- package/src/ai.ts +3 -1
package/dist/ai.js
CHANGED
|
@@ -94,11 +94,14 @@ function detectProjectContext() {
|
|
|
94
94
|
if (existsSync(pkgPath)) {
|
|
95
95
|
try {
|
|
96
96
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
97
|
-
parts.push(`Project: Node.js/TypeScript
|
|
97
|
+
parts.push(`Project: ${pkg.name}@${pkg.version} (Node.js/TypeScript)`);
|
|
98
|
+
parts.push(`npm package: ${pkg.name} (use this name for npm view, npm info, etc.)`);
|
|
98
99
|
if (pkg.scripts) {
|
|
99
100
|
const scripts = Object.entries(pkg.scripts).map(([k, v]) => `${k}: ${v}`).slice(0, 8);
|
|
100
101
|
parts.push(`Available scripts: ${scripts.join(", ")}`);
|
|
101
102
|
}
|
|
103
|
+
if (pkg.dependencies)
|
|
104
|
+
parts.push(`Dependencies: ${Object.keys(pkg.dependencies).join(", ")}`);
|
|
102
105
|
parts.push(`Use npm/bun/pnpm commands, NOT maven/gradle/cargo.`);
|
|
103
106
|
}
|
|
104
107
|
catch { }
|
package/package.json
CHANGED
package/src/ai.ts
CHANGED
|
@@ -118,11 +118,13 @@ function detectProjectContext(): string {
|
|
|
118
118
|
if (existsSync(pkgPath)) {
|
|
119
119
|
try {
|
|
120
120
|
const pkg = JSON.parse(readFileSync(pkgPath, "utf8"));
|
|
121
|
-
parts.push(`Project: Node.js/TypeScript
|
|
121
|
+
parts.push(`Project: ${pkg.name}@${pkg.version} (Node.js/TypeScript)`);
|
|
122
|
+
parts.push(`npm package: ${pkg.name} (use this name for npm view, npm info, etc.)`);
|
|
122
123
|
if (pkg.scripts) {
|
|
123
124
|
const scripts = Object.entries(pkg.scripts).map(([k, v]) => `${k}: ${v}`).slice(0, 8);
|
|
124
125
|
parts.push(`Available scripts: ${scripts.join(", ")}`);
|
|
125
126
|
}
|
|
127
|
+
if (pkg.dependencies) parts.push(`Dependencies: ${Object.keys(pkg.dependencies).join(", ")}`);
|
|
126
128
|
parts.push(`Use npm/bun/pnpm commands, NOT maven/gradle/cargo.`);
|
|
127
129
|
} catch {}
|
|
128
130
|
}
|