@vincentbanana/bananacli 0.4.0 → 0.4.1

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.
@@ -75,6 +75,11 @@ export async function startUiServer(options) {
75
75
  const prefix = `/t/${token}`;
76
76
  const assets = options.assetsDir ?? resolveAssetsDir();
77
77
  activeAssetsDir = assets;
78
+ // 界面资源缺失时界面会是空白页,很容易被误判成「服务挂了」,这里说清原因
79
+ if (!existsSync(join(assets, 'index.html'))) {
80
+ process.stderr.write(`界面资源缺失(${assets}),页面会打不开。\n` +
81
+ '多半是内核版本太旧或安装不完整,重新安装即可:npm install -g @vincentbanana/bananacli\n');
82
+ }
78
83
  let turn = null;
79
84
  const provider = () => createProvider(config.current, config);
80
85
  const backups = (sessionId) => new BackupStore(join(bananaHome(), 'backups'), sessionId);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vincentbanana/bananacli",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "A multi-provider AI agent for your terminal: file tools, shell, web search, persistent sessions, diff preview and undo",
5
5
  "type": "module",
6
6
  "engines": {