@kidli1412/dsh-token-heatmap 0.1.0 → 0.1.1

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.
Files changed (2) hide show
  1. package/lib/client.js +11 -2
  2. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -875,7 +875,16 @@ window.__ModuleLoader__.load({
875
875
  const inject = ["slots", "locale"];
876
876
 
877
877
  /**
878
- * Client plugin body: register the dictionaries and the dock entry.
878
+ * Client plugin body: register the dictionaries, the input-dock entry
879
+ * (heatmap below the composer card on the new-session screen) and the
880
+ * plugin settings card (设置 → 插件 → 插件配置).
881
+ *
882
+ * Slot-kind contract: `conversation.input.dock` is a LIST slot, so its
883
+ * registration is keyed by `id`; `settings.plugin.item` is a KEYED slot,
884
+ * so its registration must carry `key` (the settings namespace the card
885
+ * edits) — registering with `id` instead throws
886
+ * `keyed slot "settings.plugin.item" requires options.key` and fails
887
+ * the whole plugin load.
879
888
  * @param ctx - client root context.
880
889
  */
881
890
  function apply(ctx) {
@@ -888,7 +897,7 @@ window.__ModuleLoader__.load({
888
897
  }, TokenHeatmap));
889
898
  ctx.slots.inject("settings.plugin.item", () => ctx.slots.register({
890
899
  name: "settings.plugin.item",
891
- id: "token-heatmap",
900
+ key: "token-heatmap",
892
901
  order: 30,
893
902
  locale: NS
894
903
  }, TokenHeatmapSettingsCard));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kidli1412/dsh-token-heatmap",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "DSH web plugin: GitHub-style daily token-usage heatmap on the new-session screen with a selectable calendar-year view, green/blue color schemes and a display switch (设置 → 插件 → 插件配置), plus today / this-month / all-time totals.",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",