dsh-workbuddy-files 0.1.2 → 0.1.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/lib/client.js CHANGED
@@ -900,6 +900,11 @@
900
900
  const React = require("react");
901
901
  return {
902
902
  name: "workbuddy-files",
903
+ inject: [
904
+ "slots",
905
+ "sessions",
906
+ "conversation"
907
+ ],
903
908
  apply(ctx) {
904
909
  try {
905
910
  applyClient(ctx, React);
@@ -911,6 +916,7 @@
911
916
  };
912
917
  }
913
918
  function applyClient(ctx, React) {
919
+ console.log("[workbuddy-files] client apply 开始");
914
920
  const get = (name) => ctx.get(name);
915
921
  const sessions = get("sessions");
916
922
  const slots = get("slots");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-workbuddy-files",
3
- "version": "0.1.2",
3
+ "version": "0.1.3",
4
4
  "description": "WorkBuddy 风格的 DeepSeek Harness Web 插件:拖拽/粘贴文件与文件夹生成输入框引用气泡(附绝对路径)、@ 菜单检索缓存文件、对话区文件卡片、read_document 工具。",
5
5
  "keywords": [
6
6
  "dsh",
package/src/client/app.ts CHANGED
@@ -24,7 +24,8 @@ import type { UploadJob } from './types'
24
24
  /** 工厂返回的 Cordis 客户端插件 */
25
25
  export interface ClientPlugin {
26
26
  apply(ctx: Record<string, unknown>): void
27
- inject?: string[]
27
+ /** 硬依赖:Cordis 会等这些服务就绪后再 apply(缺失即无限等待,不会静默跳过) */
28
+ inject: string[]
28
29
  name?: string
29
30
  }
30
31
 
@@ -34,6 +35,8 @@ export function makeFactory() {
34
35
 
35
36
  return {
36
37
  name: 'workbuddy-files',
38
+ // slots:UI 注册入口;sessions + conversation:气泡插入管线核心
39
+ inject: ['slots', 'sessions', 'conversation'],
37
40
  apply(ctx) {
38
41
  try {
39
42
  applyClient(ctx, React)
@@ -46,6 +49,7 @@ export function makeFactory() {
46
49
  }
47
50
 
48
51
  function applyClient(ctx: Record<string, unknown>, React: ReactLike): void {
52
+ console.log('[workbuddy-files] client apply 开始')
49
53
  const get = (name: string) => (ctx.get as (n: string) => unknown)(name)
50
54
 
51
55
  // ---- 能力探测(缺失则优雅退出)----