mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 08:09:35 +00:00
chore: Enable "experimentalSortImports" in Oxfmt and reformat all imorts.
This commit is contained in:
@@ -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"]);
|
||||
|
||||
|
||||
@@ -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 };
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import { describe, expect, it } from "vitest";
|
||||
|
||||
import { deriveSessionMetaPatch } from "./metadata.js";
|
||||
|
||||
describe("deriveSessionMetaPatch", () => {
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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";
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user