dsh-tg-bridge 1.33.2 → 1.33.3
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/callbacks.mjs +5 -5
- package/package.json +1 -1
package/callbacks.mjs
CHANGED
|
@@ -122,7 +122,7 @@ export async function handleCallback(query) {
|
|
|
122
122
|
|
|
123
123
|
// A search result's plus button. The name came from the registry and the
|
|
124
124
|
// command is the one the hint under the list names, so a tap installs exactly
|
|
125
|
-
// what was read
|
|
125
|
+
// what was read — no hidden second path into pnpm.
|
|
126
126
|
if (data.startsWith('pl:i:')) {
|
|
127
127
|
const wanted = data.slice(5);
|
|
128
128
|
if (!/^(@[a-z0-9._-]+\/)?[a-z0-9._-]+$/i.test(wanted)) {
|
|
@@ -138,7 +138,7 @@ export async function handleCallback(query) {
|
|
|
138
138
|
|
|
139
139
|
// The up arrow on the update card. Same shape as the plus of a search result:
|
|
140
140
|
// the name was printed by the command that read the registry, and the tap runs
|
|
141
|
-
// `/plugin update <name>`
|
|
141
|
+
// `/plugin update <name>` — nothing else.
|
|
142
142
|
if (data.startsWith('pl:u:')) {
|
|
143
143
|
const wanted = data.slice(5);
|
|
144
144
|
if (!/^(@[a-z0-9._-]+\/)?[a-z0-9._-]+$/i.test(wanted)) {
|
|
@@ -155,7 +155,7 @@ export async function handleCallback(query) {
|
|
|
155
155
|
if (data.startsWith('fk:')) {
|
|
156
156
|
// A branch button from /branches. It does what `/resume <id>` does, so the
|
|
157
157
|
// topic moves onto that branch and the answer comes from the command
|
|
158
|
-
// itself
|
|
158
|
+
// itself — one implementation, one sentence.
|
|
159
159
|
const wanted = data.slice(3);
|
|
160
160
|
if (!/^session-[0-9a-f-]{36}$/.test(wanted)) {
|
|
161
161
|
await answer(t(lang, 'bridge.cb.unknown'));
|
|
@@ -184,7 +184,7 @@ export async function handleCallback(query) {
|
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
// A button on the failover card. Every press becomes the verb of `/fallback`,
|
|
187
|
-
// so a tap and a typed line land in the same code
|
|
187
|
+
// so a tap and a typed line land in the same code — and the command redraws the
|
|
188
188
|
// card, which is why the old keyboard is trimmed only when the press leaves it.
|
|
189
189
|
if (isFallbackPress(data)) {
|
|
190
190
|
const target = pressTarget(data);
|
|
@@ -240,7 +240,7 @@ export async function handleCallback(query) {
|
|
|
240
240
|
const name = target.kind === 'command' ? target.name : '';
|
|
241
241
|
await clearKeyboard();
|
|
242
242
|
// `/new` and `/stop` change something when typed alone, and a stray tap on
|
|
243
|
-
// them is a command nobody asked for
|
|
243
|
+
// them is a command nobody asked for — so they open their explanation.
|
|
244
244
|
const typed = runsUnasked(name) && CONTROL_COMMANDS.includes(name)
|
|
245
245
|
? commandForName(name, { t: (k, v) => t(lang, k, v) })
|
|
246
246
|
: `/help ${name}`;
|