vite-plugin-opencode-assistant 1.0.4 → 1.0.6

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 (84) hide show
  1. package/es/client/index.d.ts +1 -0
  2. package/es/client/index.js +328 -0
  3. package/es/core/api.d.ts +14 -0
  4. package/es/core/api.js +294 -0
  5. package/es/core/injector.d.ts +2 -0
  6. package/es/core/injector.js +11 -0
  7. package/es/core/service.d.ts +18 -0
  8. package/es/core/service.js +163 -0
  9. package/es/endpoints/context.d.ts +3 -0
  10. package/es/endpoints/context.js +114 -0
  11. package/es/endpoints/index.d.ts +4 -0
  12. package/es/endpoints/index.js +16 -0
  13. package/es/endpoints/sessions.d.ts +3 -0
  14. package/es/endpoints/sessions.js +79 -0
  15. package/es/endpoints/sse.d.ts +3 -0
  16. package/es/endpoints/sse.js +56 -0
  17. package/es/endpoints/start.d.ts +3 -0
  18. package/es/endpoints/start.js +35 -0
  19. package/es/endpoints/types.d.ts +13 -0
  20. package/es/endpoints/widget.d.ts +3 -0
  21. package/es/endpoints/widget.js +57 -0
  22. package/{dist/vite → es}/index.d.ts +1 -1
  23. package/es/index.js +168 -0
  24. package/es/utils/paths.d.ts +3 -0
  25. package/es/utils/paths.js +38 -0
  26. package/es/utils/system.js +241 -0
  27. package/lib/client/index.d.ts +1 -0
  28. package/lib/client/index.js +328 -0
  29. package/lib/client.js +5597 -0
  30. package/lib/core/api.d.ts +14 -0
  31. package/lib/core/api.js +321 -0
  32. package/lib/core/injector.d.ts +2 -0
  33. package/lib/core/injector.js +34 -0
  34. package/lib/core/service.d.ts +18 -0
  35. package/lib/core/service.js +180 -0
  36. package/lib/endpoints/context.d.ts +3 -0
  37. package/lib/endpoints/context.js +137 -0
  38. package/lib/endpoints/index.d.ts +4 -0
  39. package/lib/endpoints/index.js +41 -0
  40. package/lib/endpoints/sessions.d.ts +3 -0
  41. package/lib/endpoints/sessions.js +102 -0
  42. package/lib/endpoints/sse.d.ts +3 -0
  43. package/lib/endpoints/sse.js +79 -0
  44. package/lib/endpoints/start.d.ts +3 -0
  45. package/lib/endpoints/start.js +58 -0
  46. package/lib/endpoints/types.d.ts +13 -0
  47. package/lib/endpoints/types.js +15 -0
  48. package/lib/endpoints/widget.d.ts +3 -0
  49. package/lib/endpoints/widget.js +90 -0
  50. package/lib/index.d.ts +3 -0
  51. package/lib/index.js +190 -0
  52. package/lib/style.css +1 -0
  53. package/lib/utils/paths.d.ts +3 -0
  54. package/lib/utils/paths.js +73 -0
  55. package/lib/utils/system.d.ts +5 -0
  56. package/lib/utils/system.js +274 -0
  57. package/package.json +28 -33
  58. package/README.md +0 -287
  59. package/dist/constants.d.ts +0 -74
  60. package/dist/constants.js +0 -75
  61. package/dist/constants.js.map +0 -1
  62. package/dist/logger.d.ts +0 -64
  63. package/dist/logger.js +0 -311
  64. package/dist/logger.js.map +0 -1
  65. package/dist/opencode/plugins/page-context.d.ts +0 -7
  66. package/dist/opencode/plugins/page-context.js +0 -372
  67. package/dist/opencode/plugins/page-context.js.map +0 -1
  68. package/dist/opencode/web.d.ts +0 -3
  69. package/dist/opencode/web.js +0 -81
  70. package/dist/opencode/web.js.map +0 -1
  71. package/dist/types.d.ts +0 -126
  72. package/dist/types.js +0 -2
  73. package/dist/types.js.map +0 -1
  74. package/dist/vite/client.js +0 -2468
  75. package/dist/vite/client.js.map +0 -1
  76. package/dist/vite/index.js +0 -697
  77. package/dist/vite/index.js.map +0 -1
  78. package/dist/vite/injector.d.ts +0 -2
  79. package/dist/vite/injector.js +0 -6
  80. package/dist/vite/injector.js.map +0 -1
  81. package/dist/vite/utils.js +0 -206
  82. package/dist/vite/utils.js.map +0 -1
  83. /package/{dist/vite/client.d.ts → es/endpoints/types.js} +0 -0
  84. /package/{dist/vite/utils.d.ts → es/utils/system.d.ts} +0 -0
package/dist/types.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * OpenCode Vite 插件配置选项\n */\nexport interface OpenCodeOptions {\n /** 是否启用插件,默认 true */\n enabled?: boolean;\n /** Web 服务端口,默认 4097 */\n webPort?: number;\n /** 服务主机名,默认 '127.0.0.1' */\n hostname?: string;\n /** 挂件位置,默认 'bottom-right' */\n position?: \"bottom-right\" | \"bottom-left\" | \"top-right\" | \"top-left\";\n /** 主题模式,默认 'auto' */\n theme?: \"light\" | \"dark\" | \"auto\";\n /** 是否自动打开面板,默认 false */\n open?: boolean;\n /** 是否自动重载,默认 true */\n autoReload?: boolean;\n /** 是否输出详细日志,默认 false */\n verbose?: boolean;\n /** 快捷键配置,默认 'ctrl+k' */\n hotkey?: string;\n /** 服务启动后是否立即预热 Chrome MCP,默认 true */\n warmupChromeMcp?: boolean;\n}\n\n/**\n * OpenCode Web 服务启动选项\n */\nexport interface WebOptions {\n /** 服务端口 */\n port: number;\n /** 服务主机名 */\n hostname: string;\n /** 服务器 URL */\n serverUrl: string;\n /** 工作目录 */\n cwd: string;\n /** 配置目录路径 */\n configDir?: string;\n /** CORS 允许的源 */\n corsOrigins?: string[];\n /** 上下文 API URL */\n contextApiUrl?: string;\n}\n\n/**\n * 挂件注入配置选项\n */\nexport interface WidgetOptions {\n /** Web 服务 URL */\n webUrl: string;\n /** 服务器 URL */\n serverUrl: string;\n /** 挂件位置 */\n position: string;\n /** 主题模式 */\n theme: string;\n /** 是否自动打开 */\n open: boolean;\n /** 是否自动重载 */\n autoReload: boolean;\n /** 工作目录 */\n cwd: string;\n /** 会话 URL */\n sessionUrl?: string;\n /** 快捷键配置 */\n hotkey?: string;\n}\n\n/**\n * OpenCode 会话信息\n */\nexport interface SessionInfo {\n /** 会话 ID */\n id: string;\n /** 会话标识符 */\n slug: string;\n /** 项目 ID */\n projectID: string;\n /** 项目目录 */\n directory: string;\n /** 会话标题 */\n title: string;\n /** 版本号 */\n version: string;\n /** 代码变更统计 */\n summary: {\n /** 新增行数 */\n additions: number;\n /** 删除行数 */\n deletions: number;\n /** 修改文件数 */\n files: number;\n };\n /** 时间信息 */\n time: {\n /** 创建时间戳 */\n created: number;\n /** 更新时间戳 */\n updated: number;\n };\n}\n\n/**\n * 选中的元素信息\n */\nexport interface SelectedElement {\n /** 文件路径 */\n filePath: string | null;\n /** 行号 */\n line: number | null;\n /** 列号 */\n column: number | null;\n /** 元素内部文本 */\n innerText: string;\n /** 元素描述(标签名+选择器) */\n description?: string;\n}\n\n/**\n * 页面上下文数据\n */\nexport interface PageContext {\n /** 当前页面 URL */\n url: string;\n /** 当前页面标题 */\n title: string;\n /** 选中的元素列表 */\n selectedElements?: SelectedElement[];\n}\n"]}