pi-sdk-web 0.3.1 → 0.3.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/static/app.js +8 -1
- package/package.json +1 -1
package/dist/static/app.js
CHANGED
|
@@ -1205,7 +1205,14 @@ class PiWebClient {
|
|
|
1205
1205
|
} else if (builtin && builtin.unsupported) {
|
|
1206
1206
|
this.appendError(`/${name} is not supported in web mode`);
|
|
1207
1207
|
} else {
|
|
1208
|
-
|
|
1208
|
+
// Prompt templates (/cl etc.) are expanded by Pi's prompt layer -
|
|
1209
|
+
// send as prompt text, same as /skill: commands.
|
|
1210
|
+
const knownTemplate = (this.lastState?.commands || []).find((c) => c.name === name && c.source === 'prompt');
|
|
1211
|
+
if (knownTemplate) {
|
|
1212
|
+
this.send({ type: 'prompt', message: text });
|
|
1213
|
+
} else {
|
|
1214
|
+
this.send({ type: 'command', name: name, args: args });
|
|
1215
|
+
}
|
|
1209
1216
|
}
|
|
1210
1217
|
} else {
|
|
1211
1218
|
this.send({ type: 'prompt', message: text });
|