mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-15 12:55:51 +00:00
fix: 解决 node 下 loading 按钮计算错误问题
This commit is contained in:
@@ -3,11 +3,13 @@ import type { RGBColor as RGBColorType } from './types.js'
|
||||
|
||||
export function getDefaultCharacters(): string[] {
|
||||
if (process.env.TERM === 'xterm-ghostty') {
|
||||
return ['·', '✢', '✳', '✶', '✻', '*'] // Use * instead of ✽ for Ghostty because the latter renders in a way that's slightly offset
|
||||
return ['·', '✢', '✱', '✶', '✻', '*'] // ✱ replaces ✳ (emoji, renders offset in Ghostty); * replaces ✽ (same)
|
||||
}
|
||||
// ✳ (U+2733) is matched by emoji-regex in Node.js → stringWidth returns 2 instead of 1,
|
||||
// causing layout jitter when the spinner cycles frames. ✱ (U+2731) is visually similar but not emoji.
|
||||
return process.platform === 'darwin'
|
||||
? ['·', '✢', '✳', '✶', '✻', '✽']
|
||||
: ['·', '✢', '*', '✶', '✻', '✽']
|
||||
? ['·', '✢', '✱', '✶', '✻', '✽']
|
||||
: ['·', '✢', '✱', '✶', '✻', '✽']
|
||||
}
|
||||
|
||||
// Interpolate between two RGB colors
|
||||
|
||||
Reference in New Issue
Block a user