chore: include pre-built dist for github install
This commit is contained in:
+12
@@ -0,0 +1,12 @@
|
||||
import type { PluginInput } from "@opencode-ai/plugin";
|
||||
export declare function createReadImageResizerHook(_ctx: PluginInput): {
|
||||
"tool.execute.after": (input: {
|
||||
tool: string;
|
||||
sessionID: string;
|
||||
callID: string;
|
||||
}, output: {
|
||||
title: string;
|
||||
output: string;
|
||||
metadata: unknown;
|
||||
}) => Promise<void>;
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
import type { ImageDimensions } from "./types";
|
||||
export declare function parseImageDimensions(base64DataUrl: string, mimeType: string): ImageDimensions | null;
|
||||
@@ -0,0 +1,3 @@
|
||||
import type { ImageDimensions, ResizeResult } from "./types";
|
||||
export declare function calculateTargetDimensions(width: number, height: number, maxLongEdge?: number): ImageDimensions | null;
|
||||
export declare function resizeImage(base64DataUrl: string, mimeType: string, target: ImageDimensions): Promise<ResizeResult | null>;
|
||||
+1
@@ -0,0 +1 @@
|
||||
export { createReadImageResizerHook } from "./hook";
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
export interface ImageDimensions {
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
export interface ImageAttachment {
|
||||
mime: string;
|
||||
url: string;
|
||||
filename?: string;
|
||||
}
|
||||
export interface ResizeResult {
|
||||
resizedDataUrl: string;
|
||||
original: ImageDimensions;
|
||||
resized: ImageDimensions;
|
||||
}
|
||||
Reference in New Issue
Block a user