chore: reformat
This commit is contained in:
@@ -4,7 +4,6 @@ import { sanitizeText } from "@oh-my-pi/pi-natives";
|
||||
import type { AutocompleteProvider, SlashCommand } from "@oh-my-pi/pi-tui";
|
||||
import { $env } from "@oh-my-pi/pi-utils";
|
||||
import { settings } from "../../config/settings";
|
||||
import { buildSkillPromptMessage } from "../../extensibility/skills";
|
||||
import { createPromptActionAutocompleteProvider } from "../../modes/prompt-action-autocomplete";
|
||||
import { theme } from "../../modes/theme/theme";
|
||||
import type { InteractiveModeContext } from "../../modes/types";
|
||||
|
||||
@@ -39,7 +39,7 @@ export async function executeAcpBuiltinSlashCommand(
|
||||
const parsed = parseSlashCommand(text);
|
||||
if (!parsed) return false;
|
||||
const command = lookupBuiltinSlashCommand(parsed.name);
|
||||
if (!command || !command.handle) return false;
|
||||
if (!command?.handle) return false;
|
||||
const result = await command.handle(parsed, runtime);
|
||||
if (result === undefined) return { consumed: true };
|
||||
return result;
|
||||
|
||||
@@ -2,7 +2,7 @@ import * as fs from "node:fs/promises";
|
||||
import * as os from "node:os";
|
||||
import * as path from "node:path";
|
||||
import { getOAuthProviders } from "@oh-my-pi/pi-ai/utils/oauth";
|
||||
import { setProjectDir, Snowflake } from "@oh-my-pi/pi-utils";
|
||||
import { Snowflake, setProjectDir } from "@oh-my-pi/pi-utils";
|
||||
import { $ } from "bun";
|
||||
import type { SettingPath, SettingValue } from "../config/settings";
|
||||
import { settings } from "../config/settings";
|
||||
@@ -23,13 +23,13 @@ import { resolveMemoryBackend } from "../memory-backend";
|
||||
import type { InteractiveModeContext } from "../modes/types";
|
||||
import { getChangelogPath, parseChangelog } from "../utils/changelog";
|
||||
import { buildContextReportText } from "./helpers/context-report";
|
||||
import { formatDuration } from "./helpers/format";
|
||||
import { createMarketplaceManager } from "./helpers/marketplace-manager";
|
||||
import { handleMcpAcp } from "./helpers/mcp";
|
||||
import { commandConsumed, errorMessage, parseSlashCommand, parseSubcommand, usage } from "./helpers/parse";
|
||||
import { handleSshAcp } from "./helpers/ssh";
|
||||
import { handleTodoAcp } from "./helpers/todo";
|
||||
import { buildUsageReportText } from "./helpers/usage-report";
|
||||
import { formatDuration } from "./helpers/format";
|
||||
import { parseMarketplaceInstallArgs, parsePluginScopeArgs } from "./marketplace-install-parser";
|
||||
import type {
|
||||
BuiltinSlashCommand,
|
||||
|
||||
@@ -36,7 +36,7 @@ export interface ParsedSlashCommand {
|
||||
* - `{ prompt: string }` — command handled, pass `prompt` through as the new
|
||||
* user input (e.g. `/force <tool> <prompt>` keeps `<prompt>` as the message).
|
||||
*/
|
||||
export type SlashCommandResult = void | { consumed: true } | { prompt: string };
|
||||
export type SlashCommandResult = undefined | { consumed: true } | { prompt: string };
|
||||
|
||||
/**
|
||||
* Runtime visible to slash-command handlers that run in text/ACP mode.
|
||||
|
||||
Reference in New Issue
Block a user