@hunterzhu/pulse-cli 0.1.7 → 0.1.8
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/config.js +14 -0
- package/package.json +10 -5
- package/scripts/postinstall.mjs +11 -0
package/dist/config.js
CHANGED
|
@@ -4,9 +4,23 @@ import { dirname, join, resolve } from 'node:path';
|
|
|
4
4
|
export const defaultPulseConfig = {
|
|
5
5
|
providers: {
|
|
6
6
|
mock: { provider: 'mock', name: 'Mock' },
|
|
7
|
+
openai: {
|
|
8
|
+
provider: 'openai-compatible',
|
|
9
|
+
name: 'OpenAI',
|
|
10
|
+
baseURL: 'https://api.openai.com/v1',
|
|
11
|
+
apiKeyEnv: 'OPENAI_API_KEY',
|
|
12
|
+
},
|
|
13
|
+
deepseek: {
|
|
14
|
+
provider: 'deepseek',
|
|
15
|
+
name: 'DeepSeek',
|
|
16
|
+
baseURL: 'https://api.deepseek.com',
|
|
17
|
+
apiKeyEnv: 'DEEPSEEK_API_KEY',
|
|
18
|
+
},
|
|
7
19
|
},
|
|
8
20
|
models: {
|
|
9
21
|
mock: { displayName: 'mock', provider: 'mock', modelCode: 'mock', maxContextTokens: 32_000, maxOutputTokens: 4_096, reasoningEffort: 'medium' },
|
|
22
|
+
'gpt5.6-a': { displayName: 'gpt5.6-a', provider: 'openai', modelCode: 'gpt-5.6' },
|
|
23
|
+
'deepseek-chat': { displayName: 'deepseek-chat', provider: 'deepseek', modelCode: 'deepseek-chat' },
|
|
10
24
|
},
|
|
11
25
|
activeModel: 'mock',
|
|
12
26
|
approvalMode: 'ask',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hunterzhu/pulse-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "https://github.com/zhuhengtan/Pulse"
|
|
@@ -11,15 +11,20 @@
|
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/bin.js",
|
|
13
13
|
"types": "dist/bin.d.ts",
|
|
14
|
+
"files": [
|
|
15
|
+
"dist",
|
|
16
|
+
"scripts"
|
|
17
|
+
],
|
|
18
|
+
"scripts": {
|
|
19
|
+
"build": "tsc -p tsconfig.json",
|
|
20
|
+
"postinstall": "node ./scripts/postinstall.mjs"
|
|
21
|
+
},
|
|
14
22
|
"publishConfig": {
|
|
15
23
|
"access": "public",
|
|
16
24
|
"registry": "https://registry.npmjs.org"
|
|
17
25
|
},
|
|
18
|
-
"scripts": {
|
|
19
|
-
"build": "tsc -p tsconfig.json"
|
|
20
|
-
},
|
|
21
26
|
"dependencies": {
|
|
22
|
-
"@hunterzhu/pulse-server": "0.1.
|
|
27
|
+
"@hunterzhu/pulse-server": "0.1.8",
|
|
23
28
|
"ink": "^7.1.1",
|
|
24
29
|
"react": "^19.0.0",
|
|
25
30
|
"ink-spinner": "^5.0.0",
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { ensurePulseUserConfig, defaultPulseConfigPath } from '../dist/config.js'
|
|
2
|
+
|
|
3
|
+
try {
|
|
4
|
+
const configPath = defaultPulseConfigPath()
|
|
5
|
+
await ensurePulseUserConfig(configPath)
|
|
6
|
+
console.log(`Pulse config is ready at ${configPath}`)
|
|
7
|
+
} catch (error) {
|
|
8
|
+
const message = error instanceof Error ? error.message : String(error)
|
|
9
|
+
console.warn(`Pulse could not create its default config: ${message}`)
|
|
10
|
+
console.warn('Run "pulse setup" later to create it.')
|
|
11
|
+
}
|