mirror of
https://github.com/murashit/codex-panel.git
synced 2026-07-22 06:57:10 +00:00
28 lines
810 B
TypeScript
28 lines
810 B
TypeScript
import type { EditorPosition } from "obsidian";
|
|
import type { ReasoningEffort } from "../../generated/app-server/ReasoningEffort";
|
|
|
|
export type RewriteStatus = "editing-prompt" | "generating" | "preview" | "applied" | "cancelled" | "failed";
|
|
|
|
export interface RewriteSession {
|
|
filePath: string;
|
|
targetRange: {
|
|
from: EditorPosition;
|
|
to: EditorPosition;
|
|
};
|
|
originalText: string;
|
|
noteText: string;
|
|
instruction: string;
|
|
status: RewriteStatus;
|
|
streamText: string;
|
|
replacementText: string | null;
|
|
debugText: string | null;
|
|
}
|
|
|
|
export interface RewriteRuntimeSettings {
|
|
rewriteSelectionModel: string | null;
|
|
rewriteSelectionEffort: ReasoningEffort | null;
|
|
}
|
|
|
|
export function canApplyRewrite(currentText: string, originalText: string): boolean {
|
|
return currentText === originalText;
|
|
}
|