Consider it done. The open-source AI agent that works out of the box · 想到,就能做到。开源、开箱即用的 AI Agent。
TypeScript agentai-agentai-assistantandroidclaude-codecodexelectroniosllmmacosreact-nativetypescriptwindows
fix(mobile): 补齐变量赋值样式的行高,行高守护测试识别 const 赋值写法
kirozeng732f381fce07
diff --git a/apps/mobile/src/__tests__/typographyTokenDiscipline.test.ts b/apps/mobile/src/__tests__/typographyTokenDiscipline.test.tsindex f56fdc2acd..1f907291b7 100644--- a/apps/mobile/src/__tests__/typographyTokenDiscipline.test.ts+++ b/apps/mobile/src/__tests__/typographyTokenDiscipline.test.ts@@ -157,7 +157,7 @@ describe('typography token discipline', () => {for (const tag of source.matchAll(/<TextInput\b[\s\S]*?\/>/g)) {for (const key of tag[0].matchAll(/styles\.(\w+)/g)) inputKeys.add(key[1]);}- for (const block of source.matchAll(/(\w+):\s*\{([^{}]*)\}/g)) {+ for (const block of source.matchAll(/(?:const\s+)?(\w+)(?::|\s*=)\s*\{([^{}]*)\}/g)) {const [, key, body] = block;if (!/fontSize:\s*typeScale\.\w+/.test(body) || /textStyles\./.test(body)) continue;if (/\blineHeight\s*:/.test(body)) continue;@@ -185,7 +185,7 @@ describe('typography token discipline', () => {for (const rel of files) {if (!rel.endsWith('.tsx') || LOGIN_CANVAS.some((re) => re.test(rel))) continue;const source = readFileSync(join(ROOT, rel), 'utf8');- for (const block of source.matchAll(/(\w+):\s*\{([^{}]*)\}/g)) {+ for (const block of source.matchAll(/(?:const\s+)?(\w+)(?::|\s*=)\s*\{([^{}]*)\}/g)) {const [, key, body] = block;const color = body.match(/\bcolor:\s*(?:colors|c)\.(\w+)/)?.[1];const weight = body.match(/fontWeight\.(\w+)/)?.[1];diff --git a/apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx b/apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsxindex 815212588a..9ae2caeb33 100644--- a/apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx+++ b/apps/mobile/src/remote-desktop/RemoteDesktopDisplaySettings.tsx@@ -81,7 +81,7 @@ export function RemoteDesktopDisplaySettings({};}, [connected, video.modesSupported, video.displayGeometry, reload]);const disabled = !connected || !video.supported;- const title = { color: colors.textPrimary, fontSize: typeScale.body };+ const title = { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body };const hint = {color: colors.textPrimary,fontSize: typeScale.caption,diff --git a/apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx b/apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsxindex 3a2585f7fe..a100d80369 100644--- a/apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx+++ b/apps/mobile/src/remote-desktop/RemoteDesktopSecuritySettings.tsx@@ -53,7 +53,7 @@ export function RemoteDesktopSecuritySettings() {const { t } = useTranslation();const { colors } = useTheme();- const hint = { color: colors.textPrimary, fontSize: typeScale.caption };+ const hint = { color: colors.textPrimary, fontSize: typeScale.caption, lineHeight: lineHeight.caption };const switchSlot = {width: 56,minHeight: 44,diff --git a/apps/mobile/src/session/TaskTags.tsx b/apps/mobile/src/session/TaskTags.tsxindex 95bc112c43..ef0b33c10c 100644--- a/apps/mobile/src/session/TaskTags.tsx+++ b/apps/mobile/src/session/TaskTags.tsx@@ -639,7 +639,7 @@ export function TaskTagsPanel({}void reorder(id, to, expectedOrder);}- const textStyle = { color: colors.textPrimary, fontSize: typeScale.body };+ const textStyle = { color: colors.textPrimary, fontSize: typeScale.body, lineHeight: lineHeight.body };const action = (label: string,onPress: () => void,