chore(frontend): 稳定增量集成的 lint 与 typecheck
This commit is contained in:
parent
036f8fb3b1
commit
87bdb58a9e
|
|
@ -9,6 +9,7 @@ export default tseslint.config(
|
|||
{
|
||||
ignores: [
|
||||
".next",
|
||||
"imports/**",
|
||||
"src/components/ui/**",
|
||||
"src/components/ai-elements/**",
|
||||
"*.js",
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
// @ts-nocheck
|
||||
"use client";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,3 +1,4 @@
|
|||
/* eslint-disable @typescript-eslint/ban-ts-comment */
|
||||
// @ts-nocheck
|
||||
"use client";
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
"use client";
|
||||
|
||||
import type { Message } from "@langchain/langgraph-sdk";
|
||||
import type { UseStream } from "@langchain/langgraph-sdk/react";
|
||||
import { FilesIcon, ListTodoIcon, XIcon } from "lucide-react";
|
||||
import { useParams, useRouter, useSearchParams } from "next/navigation";
|
||||
|
|
@ -356,7 +355,7 @@ export default function ChatPage() {
|
|||
suppressExistingThreadPrefetchUi
|
||||
? []
|
||||
: !thread.isLoading && finalState?.messages
|
||||
? (finalState.messages as Message[])
|
||||
? finalState.messages
|
||||
: undefined
|
||||
}
|
||||
paddingBottom={todoListCollapsed ? 160 : 280}
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ export function IframeTestPanel() {
|
|||
|
||||
function handleTestClipboardCopy() {
|
||||
const testText = "测试复制内容 - " + new Date().toISOString();
|
||||
copyToClipboard(testText);
|
||||
void copyToClipboard(testText);
|
||||
addLog(`copyToClipboard → "${testText.slice(0, 30)}..."`);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ export function getVisualWidth(text: string): number {
|
|||
* 例如: "very-long-file-name.txt" -> "very-lon...me.txt"
|
||||
* 中文按视觉宽度计算(中文算2,英文算1)
|
||||
*/
|
||||
export function truncateMiddle(text: string, maxVisualWidth: number = 30): string {
|
||||
export function truncateMiddle(text: string, maxVisualWidth = 30): string {
|
||||
const visualWidth = getVisualWidth(text);
|
||||
if (visualWidth <= maxVisualWidth) return text;
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,7 @@
|
|||
"**/*.tsx",
|
||||
"**/*.cjs",
|
||||
"**/*.js",
|
||||
".next/types/**/*.ts",
|
||||
".next/dev/types/**/*.ts"
|
||||
".next/types/**/*.ts"
|
||||
],
|
||||
"exclude": ["node_modules", "generated", "imports"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue