import { ChatModeKind } from "../../constants.js";
import { URI } from "../../../../../../base/common/uri.js";
import { TMetadata } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/chat/common/promptSyntax/parsers/promptHeader/headerBase";
import { TextModelPromptParser } from "@codingame/monaco-vscode-chat-service-override/vscode/vs/workbench/contrib/chat/common/promptSyntax/parsers/textModelPromptParser";
import { PromptsType } from "@codingame/monaco-vscode-e28ac690-06d5-5ee9-92d1-02df70296354-common/vscode/vs/workbench/contrib/chat/common/promptSyntax/promptTypes";
import { ITopError } from "../parsers/types.js";
/**
 * Where the prompt is stored.
 */
export type TPromptsStorage = "local" | "user";
/**
 * Represents a prompt path with its type.
 * This is used for both prompt files and prompt source folders.
 */
export interface IPromptPath {
    /**
     * URI of the prompt.
     */
    readonly uri: URI;
    /**
     * Storage of the prompt.
     */
    readonly storage: TPromptsStorage;
    /**
     * Type of the prompt (e.g. 'prompt' or 'instructions').
     */
    readonly type: PromptsType;
}
/**
 * Type for a shared prompt parser instance returned by the {@link IPromptsService}.
 * Because the parser is shared, we omit the `dispose` method from
 * the original type so the caller cannot dispose it prematurely
 */
export type TSharedPrompt = Omit<TextModelPromptParser, "dispose">;
/**
 * Metadata node object in a hierarchical tree of prompt references.
 */
export interface IMetadata {
    /**
     * URI of a prompt file.
     */
    readonly uri: URI;
    /**
     * Metadata of the prompt file.
     */
    readonly metadata: TMetadata | null;
    /**
     * List of metadata for each valid child prompt reference.
     */
    readonly children?: readonly IMetadata[];
}
export interface ICustomChatMode {
    /**
     * URI of a custom chat mode file.
     */
    readonly uri: URI;
    /**
     * Name of the custom chat mode.
     */
    readonly name: string;
    /**
     * Description of the mode
     */
    readonly description?: string;
    /**
     * Tools metadata in the prompt header.
     */
    readonly tools?: readonly string[];
    /**
     * Model metadata in the prompt header.
     */
    readonly model?: string;
    /**
     * Contents of the custom chat mode file body.
     */
    readonly body: string;
}
/**
 * Type of combined tools metadata for the case
 * when the prompt is in the agent mode.
 */
interface ICombinedAgentToolsMetadata {
    /**
     * List of combined tools metadata for
     * the entire tree of prompt references.
     */
    readonly tools: readonly string[] | undefined;
    /**
     * Resulting chat mode of a prompt, based on modes
     * used in the entire tree of prompt references.
     */
    readonly mode: ChatModeKind.Agent;
}
/**
 * Type of combined tools metadata for the case
 * when the prompt is in non-agent mode.
 */
interface ICombinedNonAgentToolsMetadata {
    /**
     * List of combined tools metadata is empty
     * when the prompt is in non-agent mode.
     */
    readonly tools: undefined;
    /**
     * Resulting chat mode of a prompt, based on modes
     * used in the entire tree of prompt references.
     */
    readonly mode?: ChatModeKind.Ask | ChatModeKind.Edit;
}
/**
 * General type of the combined tools metadata.
 */
export type TCombinedToolsMetadata = ICombinedAgentToolsMetadata | ICombinedNonAgentToolsMetadata;
export interface IChatPromptSlashCommand {
    readonly command: string;
    readonly detail: string;
    readonly promptPath?: IPromptPath;
}
export interface IPromptParserResult {
    readonly uri: URI;
    readonly metadata: TMetadata | null;
    readonly topError: ITopError | undefined;
    readonly references: readonly URI[];
}
export {};
