chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.

This commit is contained in:
cpojer
2026-02-01 10:03:47 +09:00
parent ad943bd8cf
commit f06dd8df06
1778 changed files with 2949 additions and 4242 deletions

View File

@@ -1,6 +1,6 @@
import type { MsgContext } from "../../auto-reply/templating.js";
import { listDeliverableMessageChannels } from "../../utils/message-channel.js";
import type { GroupKeyResolution } from "./types.js";
import { listDeliverableMessageChannels } from "../../utils/message-channel.js";
const getGroupSurfaces = () => new Set<string>([...listDeliverableMessageChannels(), "webchat"]);

View File

@@ -1,3 +1,4 @@
import type { SessionScope } from "./types.js";
import {
buildAgentMainSessionKey,
DEFAULT_AGENT_ID,
@@ -6,7 +7,6 @@ import {
resolveAgentIdFromSessionKey,
} from "../../routing/session-key.js";
import { loadConfig } from "../config.js";
import type { SessionScope } from "./types.js";
export function resolveMainSessionKey(cfg?: {
session?: { scope?: SessionScope; mainKey?: string };

View File

@@ -1,5 +1,4 @@
import { describe, expect, it } from "vitest";
import { deriveSessionMetaPatch } from "./metadata.js";
describe("deriveSessionMetaPatch", () => {

View File

@@ -1,11 +1,11 @@
import type { MsgContext } from "../../auto-reply/templating.js";
import type { GroupKeyResolution, SessionEntry, SessionOrigin } from "./types.js";
import { normalizeChatType } from "../../channels/chat-type.js";
import { resolveConversationLabel } from "../../channels/conversation-label.js";
import { getChannelDock } from "../../channels/dock.js";
import { normalizeChannelId } from "../../channels/plugins/index.js";
import { normalizeMessageChannel } from "../../utils/message-channel.js";
import { buildGroupDisplayName, resolveGroupSessionKey } from "./group.js";
import type { GroupKeyResolution, SessionEntry, SessionOrigin } from "./types.js";
const mergeOrigin = (
existing: SessionOrigin | undefined,

View File

@@ -1,8 +1,8 @@
import os from "node:os";
import path from "node:path";
import type { SessionEntry } from "./types.js";
import { DEFAULT_AGENT_ID, normalizeAgentId } from "../../routing/session-key.js";
import { resolveStateDir } from "../paths.js";
import type { SessionEntry } from "./types.js";
function resolveAgentSessionsDir(
agentId?: string,

View File

@@ -1,6 +1,6 @@
import type { SessionConfig, SessionResetConfig } from "../types.base.js";
import { DEFAULT_IDLE_MINUTES } from "./types.js";
import { normalizeMessageChannel } from "../../utils/message-channel.js";
import { DEFAULT_IDLE_MINUTES } from "./types.js";
export type SessionResetMode = "daily" | "idle";
export type SessionResetType = "dm" | "group" | "thread";

View File

@@ -1,4 +1,5 @@
import type { MsgContext } from "../../auto-reply/templating.js";
import type { SessionScope } from "./types.js";
import {
buildAgentMainSessionKey,
DEFAULT_AGENT_ID,
@@ -6,7 +7,6 @@ import {
} from "../../routing/session-key.js";
import { normalizeE164 } from "../../utils.js";
import { resolveGroupSessionKey } from "./group.js";
import type { SessionScope } from "./types.js";
// Decide which session bucket to use (per-sender vs global).
export function deriveSessionKey(scope: SessionScope, ctx: MsgContext) {

View File

@@ -1,9 +1,8 @@
import JSON5 from "json5";
import crypto from "node:crypto";
import fs from "node:fs";
import path from "node:path";
import JSON5 from "json5";
import { getFileMtimeMs, isCacheEnabled, resolveCacheTtlMs } from "../cache-utils.js";
import type { MsgContext } from "../../auto-reply/templating.js";
import {
deliveryContextFromSession,
mergeDeliveryContext,
@@ -11,7 +10,7 @@ import {
normalizeSessionDeliveryFields,
type DeliveryContext,
} from "../../utils/delivery-context.js";
import type { MsgContext } from "../../auto-reply/templating.js";
import { getFileMtimeMs, isCacheEnabled, resolveCacheTtlMs } from "../cache-utils.js";
import { deriveSessionMetaPatch } from "./metadata.js";
import { mergeSessionEntry, type SessionEntry } from "./types.js";

View File

@@ -1,12 +1,10 @@
import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
import fs from "node:fs";
import path from "node:path";
import { CURRENT_SESSION_VERSION, SessionManager } from "@mariozechner/pi-coding-agent";
import type { SessionEntry } from "./types.js";
import { loadSessionStore, updateSessionStore } from "./store.js";
import { resolveDefaultSessionStorePath, resolveSessionTranscriptPath } from "./paths.js";
import { emitSessionTranscriptUpdate } from "../../sessions/transcript-events.js";
import { resolveDefaultSessionStorePath, resolveSessionTranscriptPath } from "./paths.js";
import { loadSessionStore, updateSessionStore } from "./store.js";
function stripQuery(value: string): string {
const noHash = value.split("#")[0] ?? value;

View File

@@ -1,6 +1,5 @@
import crypto from "node:crypto";
import type { Skill } from "@mariozechner/pi-coding-agent";
import crypto from "node:crypto";
import type { NormalizedChatType } from "../../channels/chat-type.js";
import type { ChannelId } from "../../channels/plugins/types.js";
import type { DeliveryContext } from "../../utils/delivery-context.js";