@ssamurias/dsh-fish 0.9.7 → 0.9.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.
- package/AGENTS.md +5 -4
- package/CHANGELOG.md +177 -0
- package/README.md +7 -2
- package/RELEASE-NOTES-0.8.3.md +71 -71
- package/RELEASE-NOTES-0.9.8.md +216 -0
- package/RELEASE-NOTES-0.9.9.md +163 -0
- package/RELEASE.md +3 -1
- package/lib/appoint.js +21 -7
- package/lib/askinchat.js +6 -1
- package/lib/at.js +240 -0
- package/lib/backup.js +15 -2
- package/lib/bili.js +36 -0
- package/lib/browse.js +15 -5
- package/lib/capture.js +20 -6
- package/lib/cardanswer.js +12 -2
- package/lib/channels.js +15 -0
- package/lib/client.js +127 -27
- package/lib/comment.js +19 -2
- package/lib/curiosity.js +3 -3
- package/lib/deliver.js +4 -0
- package/lib/derive.js +265 -23
- package/lib/desk.js +3 -2
- package/lib/dream.js +3 -1
- package/lib/echo.js +75 -0
- package/lib/events.js +96 -2
- package/lib/gapwall.js +3 -1
- package/lib/generator.js +10 -0
- package/lib/grant.js +3 -2
- package/lib/guardlog.js +58 -0
- package/lib/health.js +102 -0
- package/lib/herdiary.js +155 -11
- package/lib/home.js +28 -4
- package/lib/identity.js +18 -2
- package/lib/index.js +63 -16
- package/lib/locate.js +40 -1
- package/lib/log.js +58 -4
- package/lib/material.js +122 -0
- package/lib/move.js +147 -14
- package/lib/note.js +19 -3
- package/lib/observe.js +100 -27
- package/lib/pair.js +95 -0
- package/lib/persona.js +35 -18
- package/lib/pronoun.js +120 -0
- package/lib/pronounask.js +201 -0
- package/lib/recall.js +3 -2
- package/lib/restrict.js +285 -56
- package/lib/say.js +5 -0
- package/lib/scheduler.js +195 -30
- package/lib/schema.js +33 -0
- package/lib/scrub.js +366 -0
- package/lib/selfcheck.js +2 -2
- package/lib/selfdoc.js +51 -10
- package/lib/sessionnote.js +67 -37
- package/lib/settings.js +77 -6
- package/lib/speak.js +6 -1
- package/lib/stance.js +32 -3
- package/lib/store.js +89 -10
- package/lib/talkmem.js +55 -11
- package/lib/tenant.js +236 -36
- package/lib/tool.js +5 -6
- package/lib/transcript.js +125 -0
- package/lib/turns.js +147 -18
- package/lib/unlock.js +30 -9
- package/lib/use.js +22 -48
- package/lib/watch.js +4 -0
- package/lib/whatseen.js +138 -13
- package/lib/wish.js +10 -1
- package/package.json +1 -1
package/lib/wish.js
CHANGED
|
@@ -77,6 +77,15 @@ const TOOL_NAME_MIN = 4
|
|
|
77
77
|
/** subject 开头可以先有的空白和左引号、左括号(「`her_note`:…」「「her_note」…」也算写在最前面)。 */
|
|
78
78
|
const HEAD_OPENERS = /^[\s`'"“‘「『《〈【[((<]+/
|
|
79
79
|
|
|
80
|
+
/**
|
|
81
|
+
* 剥掉标点之后,开头还可能是「用 / 就」这类前缀(issue #109):
|
|
82
|
+
* 「用 her_note 记长一点的东西」「就是 bili_look 能看整条的」——说的是手上已有的工具。
|
|
83
|
+
*
|
|
84
|
+
* 不放「像」:`像 bash 那样能跑 python 的东西` 是拿手上的工具作比较,要的是另一样东西
|
|
85
|
+
* (#102 的用例),放行会把「还没有的东西」误判成到手。
|
|
86
|
+
*/
|
|
87
|
+
const HEAD_PREFIX = /^(?:(?:就是|用|就)\s*)+/
|
|
88
|
+
|
|
80
89
|
const DAY = 86_400_000
|
|
81
90
|
|
|
82
91
|
/** `askId` → 那条 `answer` 事件。 */
|
|
@@ -156,7 +165,7 @@ function toolNamedIn(has, subject) {
|
|
|
156
165
|
if (!subject) return ''
|
|
157
166
|
if (toolInHand(has, subject)) return subject
|
|
158
167
|
if (!(has instanceof Set) && !Array.isArray(has)) return ''
|
|
159
|
-
const head = subject.toLowerCase().replace(HEAD_OPENERS, '')
|
|
168
|
+
const head = subject.toLowerCase().replace(HEAD_OPENERS, '').replace(HEAD_PREFIX, '')
|
|
160
169
|
let hit = ''
|
|
161
170
|
for (const raw of has instanceof Set ? [...has] : has) {
|
|
162
171
|
const name = String(raw ?? '').trim().toLowerCase()
|