dsh-skill-picker 0.5.26 → 0.5.27

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-skill-picker",
3
3
  "description": "DSH Web GUI skill picker: a button beside the composer opens a searchable list of installed skills; picking one inserts the official `/skill-name` gesture into the input box, so the skill loads with your message (WorkBuddy-style skill invocation for DeepSeek Harness).",
4
- "version": "0.5.26",
4
+ "version": "0.5.27",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {
@@ -144,7 +144,18 @@ function focusComposer(from, onlyIfFocused = false) {
144
144
  : null
145
145
  if (editor !== null && editor !== undefined) {
146
146
  if (onlyIfFocused && document.activeElement !== editor) return false
147
- if (typeof editor.focus === 'function') editor.focus()
147
+ if (typeof editor.focus === 'function') {
148
+ // Exempt this focus from dsh-pocket's mobile autofocus blocker: after
149
+ // picking a skill the caret SHOULD land back in the composer (that is
150
+ // the whole point of focusComposer). A timestamp, so the 60 ms guarded
151
+ // re-seat below is covered too; the blocker only trusts it for ~1.2 s.
152
+ try {
153
+ window.__dshSkillPickerFocusing = Date.now()
154
+ } catch {
155
+ /* a blocked window object is fine — the blocker just won't exempt us */
156
+ }
157
+ editor.focus()
158
+ }
148
159
  try {
149
160
  if (editor.isContentEditable === true) {
150
161
  const range = document.createRange()