style: 完成所有文件的lint

This commit is contained in:
claude-code-best
2026-05-01 21:39:30 +08:00
parent d136872cc9
commit 6182015005
1333 changed files with 68255 additions and 77882 deletions

View File

@@ -1,20 +1,20 @@
import React from 'react'
import { MessageResponse } from 'src/components/MessageResponse.js'
import { Text } from '@anthropic/ink'
import { countCharInString } from 'src/utils/stringUtils.js'
import type { Input, Output } from './RemoteTriggerTool.js'
import React from 'react';
import { MessageResponse } from 'src/components/MessageResponse.js';
import { Text } from '@anthropic/ink';
import { countCharInString } from 'src/utils/stringUtils.js';
import type { Input, Output } from './RemoteTriggerTool.js';
export function renderToolUseMessage(input: Partial<Input>): React.ReactNode {
return `${input.action ?? ''}${input.trigger_id ? ` ${input.trigger_id}` : ''}`
return `${input.action ?? ''}${input.trigger_id ? ` ${input.trigger_id}` : ''}`;
}
export function renderToolResultMessage(output: Output): React.ReactNode {
const lines = countCharInString(output.json, '\n') + 1
const lines = countCharInString(output.json, '\n') + 1;
return (
<MessageResponse>
<Text>
HTTP {output.status} <Text dimColor>({lines} lines)</Text>
</Text>
</MessageResponse>
)
);
}

View File

@@ -42,9 +42,7 @@ mock.module('src/constants/oauth.js', () => {
})
mock.module('src/utils/remoteTriggerAudit.js', () => ({
appendRemoteTriggerAuditRecord: async (
record: Record<string, unknown>,
) => {
appendRemoteTriggerAuditRecord: async (record: Record<string, unknown>) => {
const fullRecord = {
auditId: `audit-${auditRecords.length + 1}`,
createdAt: Date.now(),
@@ -87,10 +85,9 @@ describe('RemoteTriggerTool audit', () => {
const { RemoteTriggerTool } = await import('../RemoteTriggerTool')
await expect(
RemoteTriggerTool.call(
{ action: 'run' },
{ abortController: new AbortController() } as any,
),
RemoteTriggerTool.call({ action: 'run' }, {
abortController: new AbortController(),
} as any),
).rejects.toThrow('run requires trigger_id')
expect(auditRecords).toHaveLength(1)