mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-18 06:15:51 +00:00
feat: 问就是封包
This commit is contained in:
@@ -553,8 +553,8 @@ export function buildMissedTaskNotification(missed: CronTask[]): string {
|
||||
// Use a fence one longer than any backtick run in the prompt so a
|
||||
// prompt containing ``` cannot close the fence early and un-wrap the
|
||||
// trailing text (CommonMark fence-matching rule).
|
||||
const longestRun = (t.prompt.match(/`+/g) ?? []).reduce(
|
||||
(max, run) => Math.max(max, run.length),
|
||||
const longestRun = (t.prompt.match(/`+/g) ?? ([] as string[])).reduce(
|
||||
(max: number, run: string) => Math.max(max, run.length),
|
||||
0,
|
||||
)
|
||||
const fence = '`'.repeat(Math.max(3, longestRun + 1))
|
||||
|
||||
Reference in New Issue
Block a user