opencode-preview-plus 0.13.0

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.
@@ -0,0 +1,24 @@
1
+ import { Plugin } from '@opencode-ai/plugin';
2
+
3
+ declare const PREVIEW_TOOL_DESCRIPTION = "Open a browser preview and return a Preview URL for previewable files such as Markdown, DrawIO, HTML, PNG, SVG, and code files. Use this after creating or editing previewable files, and copy the returned Preview URL exactly into the final response.";
4
+ declare const PREVIEW_SYSTEM_PROMPT = "When you create or modify previewable files such as Markdown (.md), DrawIO (.drawio), HTML, PNG, SVG, or source code files, you MUST call the preview tool for each relevant file before your final response.\n\nThe preview tool opens the browser preview automatically. OpenCode Desktop does not render TUI plugin sidebar slots, so do not expect an embedded Preview panel in Desktop.\n\nDo not manually construct preview URLs. Use only the exact Preview URL returned by the preview tool, and include that exact URL in your final response.";
5
+ declare function buildPreviewUrl(baseUrl: string, projectId: string, file: string, worktree?: string): string;
6
+ declare function resolvePreviewInputPath(input: string, directory: string): string;
7
+ declare function toProjectRelativePath(absolutePath: string, worktree: string): string | null;
8
+ declare function addPreviewSystemPrompt(output: {
9
+ system: string[];
10
+ }): void;
11
+ declare function applyPreviewToolDefinition(input: {
12
+ toolID: string;
13
+ }, output: {
14
+ description: string;
15
+ }): void;
16
+ declare const server: Plugin;
17
+ /** @deprecated Use `server` instead */
18
+ declare const PreviewPlugin: Plugin;
19
+ declare const _default: {
20
+ id: string;
21
+ server: Plugin;
22
+ };
23
+
24
+ export { PREVIEW_SYSTEM_PROMPT, PREVIEW_TOOL_DESCRIPTION, PreviewPlugin, addPreviewSystemPrompt, applyPreviewToolDefinition, buildPreviewUrl, _default as default, resolvePreviewInputPath, server, toProjectRelativePath };