opencode-tui-image-clipboard-fix 1.0.9 → 1.0.11

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/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OpenCode TUI Image Clipboard Fix
2
2
 
3
- 修复 OpenCode TUI 中图片粘贴和拖入的问题:自动将图片保存为本地文件,并替换 `[Image N]` 占位符为实际文件路径。
3
+ 修复 OpenCode TUI 中图片粘贴的问题:自动将剪贴板中的图片保存为本地文件,并替换 `[Image N]` 占位符为实际文件路径。
4
4
 
5
5
  ## 🚀 安装
6
6
 
@@ -32,7 +32,7 @@ npm install -g opencode-tui-image-clipboard-fix
32
32
  ```
33
33
  ┌─────────────────────────────────────────────────────┐
34
34
  │ OpenCode TUI │
35
- 用户粘贴/拖入图片
35
+ 用户粘贴图片
36
36
  │ ↓ │
37
37
  │ 生成 FilePart (url: "data:image/...;base64,...") │
38
38
  │ 消息文本包含 [Image 1] 占位符 │
package/lib/index.d.ts CHANGED
@@ -82,7 +82,5 @@ type Plugin = (input: PluginInput) => Promise<{
82
82
  * 3. 在发送给模型时替换 [Image N] 占位符为实际文件路径(不影响界面显示)
83
83
  * 4. 移除 FilePart,只保留文本(避免不支持图片的模型报错)
84
84
  */
85
- export declare const ImageStoragePlugin: Plugin & {
86
- name: string;
87
- };
88
- export default ImageStoragePlugin;
85
+ export declare const ImageClipboardFix: Plugin;
86
+ export default ImageClipboardFix;
package/lib/index.js CHANGED
@@ -18,7 +18,8 @@ const messageImagePaths = new Map();
18
18
  * 3. 在发送给模型时替换 [Image N] 占位符为实际文件路径(不影响界面显示)
19
19
  * 4. 移除 FilePart,只保留文本(避免不支持图片的模型报错)
20
20
  */
21
- export const ImageStoragePlugin = Object.assign(async ({ client, directory }) => {
21
+ // Plugin implementation with specific function name for better identification
22
+ export const ImageClipboardFix = async ({ client, directory }) => {
22
23
  const config = {
23
24
  ...DEFAULT_CONFIG,
24
25
  };
@@ -176,5 +177,5 @@ export const ImageStoragePlugin = Object.assign(async ({ client, directory }) =>
176
177
  },
177
178
  },
178
179
  };
179
- }, { name: "image-clipboard-fix" });
180
- export default ImageStoragePlugin;
180
+ };
181
+ export default ImageClipboardFix;
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "opencode-tui-image-clipboard-fix",
3
- "version": "1.0.9",
3
+ "version": "1.0.11",
4
4
  "type": "module",
5
5
  "displayName": "Image Clipboard Fix",
6
- "description": "OpenCode TUI plugin to fix image paste/drag issues - saves images locally and replaces [Image N] with file paths",
6
+ "description": "OpenCode TUI plugin to fix image paste issues - saves clipboard images locally and replaces [Image N] with file paths",
7
7
  "main": "lib/index.js",
8
8
  "types": "lib/index.d.ts",
9
9
  "exports": {