fix: resolve lint errors - remove unused imports and prefix unused variables

This commit is contained in:
spiceoogway 2026-01-30 08:10:45 -05:00
parent c8c74e50ad
commit 557a7aa124
8 changed files with 9 additions and 17 deletions

1
openclaw Submodule

@ -0,0 +1 @@
Subproject commit 0639c7bf1f37bafeb847afc9e422f05f3bb084a3

View File

@ -10,8 +10,9 @@ export async function writeOAuthCredentials(
agentDir?: string,
): Promise<void> {
// Write to resolved agent dir so gateway finds credentials on startup.
const emailStr = typeof creds.email === "string" ? creds.email : "default";
upsertAuthProfile({
profileId: `${provider}:${creds.email ?? "default"}`,
profileId: `${provider}:${emailStr}`,
credential: {
type: "oauth",
provider,

View File

@ -506,7 +506,7 @@ export async function runHeartbeatOnce(opts: {
// Check if this is an exec event with pending exec completion system events.
// If so, use a specialized prompt that instructs the model to relay the result
// instead of the standard heartbeat prompt with "reply HEARTBEAT_OK".
const isExecEvent = opts.reason === "exec-event";
const _isExecEvent = opts.reason === "exec-event";
const pendingEvents = peekSystemEvents(sessionKey);
const hasExecCompletion = pendingEvents.some((evt) => evt.includes("Exec finished"));
// Check for generic (non-exec) system events that may require action (e.g., from cron jobs).

View File

@ -4,7 +4,6 @@
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { AuthFlow, verifySession } from "./auth.js";
import type { AuthState } from "./types.js";
// Mock readline to avoid stdin/stdout in tests
const mockPrompt = vi.fn();

View File

@ -13,12 +13,7 @@ import { StringSession } from "telegram/sessions";
import { NewMessage, type NewMessageEvent } from "telegram/events";
import type { Api } from "telegram";
import { createSubsystemLogger } from "../logging/subsystem.js";
import type {
ConnectionState,
GramJSMessageContext,
SendMessageParams,
SessionOptions,
} from "./types.js";
import type { ConnectionState, GramJSMessageContext, SendMessageParams } from "./types.js";
const log = createSubsystemLogger("telegram-gramjs:client");
@ -45,7 +40,7 @@ export class GramJSClient {
apiId,
apiHash,
sessionString = "",
proxy,
proxy: _proxy,
connectionRetries = 5,
timeout = 30,
} = options;

View File

@ -8,10 +8,7 @@
*/
import type { OpenClawConfig } from "../config/config.js";
import type {
TelegramGramJSAccountConfig,
TelegramGramJSConfig,
} from "../config/types.telegram-gramjs.js";
import type { TelegramGramJSConfig } from "../config/types.telegram-gramjs.js";
import type { ChannelConfigAdapter } from "../channels/plugins/types.adapters.js";
import type { ResolvedGramJSAccount } from "./types.js";
import { createSubsystemLogger } from "../logging/subsystem.js";

View File

@ -169,8 +169,8 @@ export function buildSessionKey(gramjsContext: GramJSMessageContext, accountId:
* - Checking message.entities for mentions
*/
export function wasMessageMentioned(
gramjsContext: GramJSMessageContext,
botUsername?: string,
_gramjsContext: GramJSMessageContext,
_botUsername?: string,
): boolean {
// TODO: Implement mention detection
// For now, return false (rely on requireMention config)

View File

@ -3,7 +3,6 @@
*/
import type { TelegramGramJSAccountConfig } from "../config/types.telegram-gramjs.js";
import type { OpenClawConfig } from "../config/config.js";
/**
* Resolved account configuration with all necessary fields populated.