diff --git a/packages/@ant/ink/src/core/parse-keypress.ts b/packages/@ant/ink/src/core/parse-keypress.ts index 892fb5cca..6febc862e 100644 --- a/packages/@ant/ink/src/core/parse-keypress.ts +++ b/packages/@ant/ink/src/core/parse-keypress.ts @@ -697,11 +697,12 @@ function parseKeypress(s: string = ''): ParsedKey { return createNavKey(s, 'mouse', false) } - if (s === '\r') { + if (s === '\r' || s === '\r\n') { key.raw = undefined key.name = 'return' } else if (s === '\n') { - key.name = 'enter' + key.raw = undefined + key.name = 'return' } else if (s === '\t') { key.name = 'tab' } else if (s === '\b' || s === '\x1b\b') { diff --git a/src/costrict/favorite/favorite.ts b/src/costrict/favorite/favorite.ts index 45b3b659a..25887d475 100644 --- a/src/costrict/favorite/favorite.ts +++ b/src/costrict/favorite/favorite.ts @@ -6,6 +6,7 @@ import { getClaudeConfigHomeDir } from '../../utils/envUtils.js' import { saveGlobalConfig, getGlobalConfig } from '../../utils/config.js' import { clearSkillCaches } from '../../skills/loadSkillsDir.js' import { parseFrontmatter } from '../../utils/frontmatterParser.js' +import { logForDebugging } from '../../utils/debug.js' import type { McpServerConfig } from '../../services/mcp/types.js' const FAVORITE_PAGE_SIZE = 20 @@ -611,7 +612,7 @@ export async function listFavoriteItems(type?: FavoriteItemType): Promise