@ppdocs/mcp 3.2.8 → 3.2.9

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/web/ui.js +4 -3
  2. package/package.json +1 -1
package/dist/web/ui.js CHANGED
@@ -111,7 +111,8 @@ function init(){
111
111
  var entry=items[i].webkitGetAsEntry&&items[i].webkitGetAsEntry();
112
112
  if(entry&&entry.isDirectory){
113
113
  go('add',{addStep:1,addDir:entry.name});
114
- toast('📂 检测到 '+entry.name+',可直接发送授权或补全路径');
114
+ toast('📂 检测到 '+entry.name+',请补全绝对路径后发送授权');
115
+ setTimeout(function(){var inp=document.getElementById('iDir');if(inp){inp.focus();inp.setSelectionRange(0,0)}},150);
115
116
  return;
116
117
  }
117
118
  }
@@ -193,14 +194,14 @@ function renderAddStep1(){
193
194
  return '<span class="back" onclick="cancelAuth();go(\\x27list\\x27)">← 返回项目列表</span>'+
194
195
  '<div class="card no-hover"><div class="section"><h2>➕ 添加项目</h2>'+
195
196
  '<p style="font-size:13px;color:#64748b;margin-bottom:12px">点击发送授权,在主机端 PPDocs 应用中选择项目并批准</p>'+
196
- '<div class="fg"><label>本地项目目录 (可选,MCP安装时需要)</label><input id="iDir" value="'+S.addDir+'" placeholder="(可选) D:/projects/my-app" oninput="S.addDir=this.value"></div>'+
197
+ '<div class="fg"><label>本地项目目录 (可选,MCP安装时需要)</label><input id="iDir" value="'+S.addDir+'" placeholder="Win: D:\\\\projects\\\\app Mac: /Users/xxx/app" oninput="S.addDir=this.value"></div>'+
197
198
  '<div class="btn-row"><button class="btn btn-p" onclick="doAuthStart()">📡 发送授权请求</button></div>'+
198
199
  '</div></div>';
199
200
  }
200
201
 
201
202
  function doAuthStart(){
202
203
  var dir=(document.getElementById('iDir')?document.getElementById('iDir').value:'').trim();
203
- if(dir&&!/^[A-Za-z]:[\\\\\\/]|^\\//.test(dir)){toast('路径需为绝对路径或留空','err');return}
204
+ if(dir&&!/^[A-Za-z]:[\\\\\\/]|^\\/|^~\//.test(dir)){toast('路径需为绝对路径(D:\\xxx 或 /Users/xxx)或留空','err');return}
204
205
  S.addDir=dir;
205
206
  api('/api/auth/start',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify({localDir:dir||''})}).then(function(r){
206
207
  if(!r.ok){toast(r.error||'授权请求失败','err');return}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ppdocs/mcp",
3
- "version": "3.2.8",
3
+ "version": "3.2.9",
4
4
  "description": "ppdocs MCP Server - Knowledge Graph for Claude",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",