mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 15:01:41 +03:00
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { getSlashCommands, parseCommand } from "./commands.js";
|
||||
|
||||
describe("tui slash commands", () => {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import type { SlashCommand } from "@mariozechner/pi-tui";
|
||||
import type { OpenClawConfig } from "../config/types.js";
|
||||
import { listChatCommands, listChatCommandsForConfig } from "../auto-reply/commands-registry.js";
|
||||
import { formatThinkingLevels, listThinkingLevelLabels } from "../auto-reply/thinking.js";
|
||||
import type { OpenClawConfig } from "../config/types.js";
|
||||
|
||||
const VERBOSE_LEVELS = ["on", "off"];
|
||||
const REASONING_LEVELS = ["on", "off"];
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import type { Component } from "@mariozechner/pi-tui";
|
||||
import {
|
||||
Input,
|
||||
matchesKey,
|
||||
@@ -6,7 +7,6 @@ import {
|
||||
type SelectListTheme,
|
||||
getEditorKeybindings,
|
||||
} from "@mariozechner/pi-tui";
|
||||
import type { Component } from "@mariozechner/pi-tui";
|
||||
import chalk from "chalk";
|
||||
import { fuzzyFilterLower, prepareSearchItems } from "./fuzzy-filter.js";
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { createCommandHandlers } from "./tui-command-handlers.js";
|
||||
|
||||
describe("tui command handlers", () => {
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
import type { Component, TUI } from "@mariozechner/pi-tui";
|
||||
import type { ChatLog } from "./components/chat-log.js";
|
||||
import type { GatewayChatClient } from "./gateway-chat.js";
|
||||
import type {
|
||||
AgentSummary,
|
||||
GatewayStatusSummary,
|
||||
TuiOptions,
|
||||
TuiStateAccess,
|
||||
} from "./tui-types.js";
|
||||
import {
|
||||
formatThinkingLevels,
|
||||
normalizeUsageDisplay,
|
||||
@@ -7,20 +15,12 @@ import {
|
||||
import { normalizeAgentId } from "../routing/session-key.js";
|
||||
import { formatRelativeTime } from "../utils/time-format.js";
|
||||
import { helpText, parseCommand } from "./commands.js";
|
||||
import type { ChatLog } from "./components/chat-log.js";
|
||||
import {
|
||||
createFilterableSelectList,
|
||||
createSearchableSelectList,
|
||||
createSettingsList,
|
||||
} from "./components/selectors.js";
|
||||
import type { GatewayChatClient } from "./gateway-chat.js";
|
||||
import { formatStatusSummary } from "./tui-status-summary.js";
|
||||
import type {
|
||||
AgentSummary,
|
||||
GatewayStatusSummary,
|
||||
TuiOptions,
|
||||
TuiStateAccess,
|
||||
} from "./tui-types.js";
|
||||
|
||||
type CommandHandlerContext = {
|
||||
client: GatewayChatClient;
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { createEventHandlers } from "./tui-event-handlers.js";
|
||||
import type { AgentEvent, ChatEvent, TuiStateAccess } from "./tui-types.js";
|
||||
import { createEventHandlers } from "./tui-event-handlers.js";
|
||||
|
||||
type MockChatLog = {
|
||||
startTool: ReturnType<typeof vi.fn>;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import type { TUI } from "@mariozechner/pi-tui";
|
||||
import type { ChatLog } from "./components/chat-log.js";
|
||||
import type { AgentEvent, ChatEvent, TuiStateAccess } from "./tui-types.js";
|
||||
import { asString, extractTextFromMessage, isCommandMessage } from "./tui-formatters.js";
|
||||
import { TuiStreamAssembler } from "./tui-stream-assembler.js";
|
||||
import type { AgentEvent, ChatEvent, TuiStateAccess } from "./tui-types.js";
|
||||
|
||||
type EventHandlerContext = {
|
||||
chatLog: ChatLog;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import {
|
||||
extractContentFromMessage,
|
||||
extractTextFromMessage,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { formatTokenCount } from "../utils/usage-format.js";
|
||||
import { formatRawAssistantErrorForUi } from "../agents/pi-embedded-helpers.js";
|
||||
import { formatTokenCount } from "../utils/usage-format.js";
|
||||
|
||||
export function resolveFinalAssistantText(params: {
|
||||
finalText?: string | null;
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { createEditorSubmitHandler } from "./tui.js";
|
||||
|
||||
describe("createEditorSubmitHandler", () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { createLocalShellRunner } from "./tui-local-shell.js";
|
||||
|
||||
const createSelector = () => {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import type { Component } from "@mariozechner/pi-tui";
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { createOverlayHandlers } from "./tui-overlays.js";
|
||||
|
||||
class DummyComponent implements Component {
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
import type { TUI } from "@mariozechner/pi-tui";
|
||||
import type { ChatLog } from "./components/chat-log.js";
|
||||
import type { GatewayAgentsList, GatewayChatClient } from "./gateway-chat.js";
|
||||
import type { TuiOptions, TuiStateAccess } from "./tui-types.js";
|
||||
import {
|
||||
normalizeAgentId,
|
||||
normalizeMainKey,
|
||||
parseAgentSessionKey,
|
||||
} from "../routing/session-key.js";
|
||||
import type { ChatLog } from "./components/chat-log.js";
|
||||
import type { GatewayAgentsList, GatewayChatClient } from "./gateway-chat.js";
|
||||
import { asString, extractTextFromMessage, isCommandMessage } from "./tui-formatters.js";
|
||||
import type { TuiOptions, TuiStateAccess } from "./tui-types.js";
|
||||
|
||||
type SessionActionContext = {
|
||||
client: GatewayChatClient;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { GatewayStatusSummary } from "./tui-types.js";
|
||||
import { formatAge } from "../infra/channel-summary.js";
|
||||
import { formatTokenCount } from "../utils/usage-format.js";
|
||||
import { formatContextUsageLine } from "./tui-formatters.js";
|
||||
import type { GatewayStatusSummary } from "./tui-types.js";
|
||||
|
||||
export function formatStatusSummary(summary: GatewayStatusSummary) {
|
||||
const lines: string[] = [];
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { TuiStreamAssembler } from "./tui-stream-assembler.js";
|
||||
|
||||
describe("TuiStreamAssembler", () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { buildWaitingStatusMessage, pickWaitingPhrase } from "./tui-waiting.js";
|
||||
|
||||
const theme = {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it, vi } from "vitest";
|
||||
|
||||
import { createEditorSubmitHandler } from "./tui.js";
|
||||
|
||||
describe("createEditorSubmitHandler", () => {
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { resolveFinalAssistantText } from "./tui.js";
|
||||
|
||||
describe("resolveFinalAssistantText", () => {
|
||||
|
||||
+8
-8
@@ -6,6 +6,13 @@ import {
|
||||
Text,
|
||||
TUI,
|
||||
} from "@mariozechner/pi-tui";
|
||||
import type {
|
||||
AgentSummary,
|
||||
SessionInfo,
|
||||
SessionScope,
|
||||
TuiOptions,
|
||||
TuiStateAccess,
|
||||
} from "./tui-types.js";
|
||||
import { resolveDefaultAgentId } from "../agents/agent-scope.js";
|
||||
import { loadConfig } from "../config/config.js";
|
||||
import {
|
||||
@@ -23,16 +30,9 @@ import { createCommandHandlers } from "./tui-command-handlers.js";
|
||||
import { createEventHandlers } from "./tui-event-handlers.js";
|
||||
import { formatTokens } from "./tui-formatters.js";
|
||||
import { createLocalShellRunner } from "./tui-local-shell.js";
|
||||
import { buildWaitingStatusMessage, defaultWaitingPhrases } from "./tui-waiting.js";
|
||||
import { createOverlayHandlers } from "./tui-overlays.js";
|
||||
import { createSessionActions } from "./tui-session-actions.js";
|
||||
import type {
|
||||
AgentSummary,
|
||||
SessionInfo,
|
||||
SessionScope,
|
||||
TuiOptions,
|
||||
TuiStateAccess,
|
||||
} from "./tui-types.js";
|
||||
import { buildWaitingStatusMessage, defaultWaitingPhrases } from "./tui-waiting.js";
|
||||
|
||||
export { resolveFinalAssistantText } from "./tui-formatters.js";
|
||||
export type { TuiOptions } from "./tui-types.js";
|
||||
|
||||
Reference in New Issue
Block a user