feat: 功能標籤分類、對白檢索與注入 #15

Merged
jiantw83 merged 1 commits from feat/w7-retrieval into main 2026-10-14 17:44:56 +00:00
Contributor

Refs #8(延遲量測要在實際 session 裡做,量完才 Closes)

疊在 PR #12(W8)之上,而 #12 疊在 #11(W2)之上,請依序合併。

內容

  • classify.ts:用 $.model.complete(Haiku、低 effort、3 秒逾時)判斷回應的功能標籤;失敗一律回傳 null。不需要 claude -p。
  • retrieval.ts:取同標籤對白 k 句,依 id 排序後輪流取。
  • inject.ts、register.tsx:prompt.submit 時附加只增不改的訊息,不影響快取;索引為空不呼叫模型。
  • data/index.ts:索引目前為空,W5、W6 填入。
  • 新增設定 showTiming,在狀態列顯示分類耗時。

驗證

  • claude plugin validate 通過;claude plugin test 38 項通過(新增 22 項)。
  • 沒有做型別檢查(tsc),也沒有在實際 session 裡執行過 hook。

🤖 Generated with Claude Code

Refs #8(延遲量測要在實際 session 裡做,量完才 Closes) 疊在 PR #12(W8)之上,而 #12 疊在 #11(W2)之上,請依序合併。 ## 內容 - `classify.ts`:用 `$.model.complete`(Haiku、低 effort、3 秒逾時)判斷回應的功能標籤;失敗一律回傳 null。不需要 `claude -p`。 - `retrieval.ts`:取同標籤對白 k 句,依 id 排序後輪流取。 - `inject.ts`、`register.tsx`:prompt.submit 時附加只增不改的訊息,不影響快取;索引為空不呼叫模型。 - `data/index.ts`:索引目前為空,W5、W6 填入。 - 新增設定 `showTiming`,在狀態列顯示分類耗時。 ## 驗證 - `claude plugin validate` 通過;`claude plugin test` 38 項通過(新增 22 項)。 - 沒有做型別檢查(tsc),也沒有在實際 session 裡執行過 hook。 🤖 Generated with [Claude Code](https://claude.com/claude-code)
admin added 1 commit 2026-10-14 17:44:10 +00:00
用 $.model.complete(Haiku)判斷回應的功能標籤,從角色索引取同標籤對白,
以只增不改的訊息附在使用者訊息之前;失敗一律退回不注入。

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
jiantw83 merged commit 770928aef6 into main 2026-10-14 17:44:56 +00:00
jiantw83 deleted branch feat/w7-retrieval 2026-10-14 17:44:56 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: jiantw83/jsc-plugins#15