@ppdocs/mcp 3.7.0 → 3.7.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.
- package/dist/tools/discussion.js +5 -2
- package/package.json +1 -1
package/dist/tools/discussion.js
CHANGED
|
@@ -139,9 +139,12 @@ export function registerDiscussionTools(server, ctx) {
|
|
|
139
139
|
switch (action) {
|
|
140
140
|
// ============ 公开操作 ============
|
|
141
141
|
case 'list': {
|
|
142
|
-
const
|
|
143
|
-
if (!Array.isArray(
|
|
142
|
+
const all = await client().discussionList();
|
|
143
|
+
if (!Array.isArray(all))
|
|
144
144
|
return wrap(`当前无活跃的讨论 (本项目: ${me})`);
|
|
145
|
+
const active = all.filter(d => isMember(d, myPid));
|
|
146
|
+
if (active.length === 0)
|
|
147
|
+
return wrap(`当前无参与的活跃讨论 (本项目: ${myPid})`);
|
|
145
148
|
return wrap(formatList(active, ctx));
|
|
146
149
|
}
|
|
147
150
|
case 'history': {
|