mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 21:08:25 +00:00
chore: Enable more lint rules, disable some that trigger a lot. Will clean up later.
This commit is contained in:
@@ -108,7 +108,7 @@ export async function channelsAddCommand(
|
||||
if (wantsNames) {
|
||||
for (const channel of selection) {
|
||||
const accountId = accountIds[channel] ?? DEFAULT_ACCOUNT_ID;
|
||||
const plugin = getChannelPlugin(channel as ChannelId);
|
||||
const plugin = getChannelPlugin(channel);
|
||||
const account = plugin?.config.resolveAccount(nextConfig, accountId) as
|
||||
| { name?: string }
|
||||
| undefined;
|
||||
|
||||
@@ -38,25 +38,25 @@ export async function channelsRemoveCommand(
|
||||
|
||||
if (useWizard && prompter) {
|
||||
await prompter.intro("Remove channel account");
|
||||
const selectedChannel = (await prompter.select({
|
||||
const selectedChannel = await prompter.select({
|
||||
message: "Channel",
|
||||
options: listChannelPlugins().map((plugin) => ({
|
||||
value: plugin.id,
|
||||
label: plugin.meta.label,
|
||||
})),
|
||||
})) as ChatChannel;
|
||||
});
|
||||
channel = selectedChannel;
|
||||
|
||||
accountId = await (async () => {
|
||||
const ids = listAccountIds(cfg, selectedChannel);
|
||||
const choice = (await prompter.select({
|
||||
const choice = await prompter.select({
|
||||
message: "Account",
|
||||
options: ids.map((id) => ({
|
||||
value: id,
|
||||
label: id === DEFAULT_ACCOUNT_ID ? "default (primary)" : id,
|
||||
})),
|
||||
initialValue: ids[0] ?? DEFAULT_ACCOUNT_ID,
|
||||
})) as string;
|
||||
});
|
||||
return normalizeAccountId(choice);
|
||||
})();
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ export function formatGatewayChannelsStatusLines(payload: Record<string, unknown
|
||||
for (const plugin of plugins) {
|
||||
const accounts = accountPayloads[plugin.id];
|
||||
if (accounts && accounts.length > 0) {
|
||||
lines.push(...accountLines(plugin.id as ChatChannel, accounts));
|
||||
lines.push(...accountLines(plugin.id, accounts));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -217,7 +217,7 @@ async function formatConfigChannelsStatusLines(
|
||||
snapshots.push(snapshot);
|
||||
}
|
||||
if (snapshots.length > 0) {
|
||||
lines.push(...accountLines(plugin.id as ChatChannel, snapshots));
|
||||
lines.push(...accountLines(plugin.id, snapshots));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user