Skip to content

Commit 1359b6a

Browse files
authored
chat-persistent.sh : use bracket expressions in grep (#1564)
1 parent 7d87381 commit 1359b6a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/chat-persistent.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ CUR_PROMPT_CACHE="${CHAT_SAVE_DIR}/current-cache.bin"
2323
NEXT_PROMPT_FILE="${CHAT_SAVE_DIR}/next-prompt.txt"
2424
NEXT_PROMPT_CACHE="${CHAT_SAVE_DIR}/next-cache.bin"
2525

26-
SESSION_SIZE_MSG_PATTERN='main: session file matches \d+ / \d+'
27-
SAMPLE_TIME_MSG_PATTERN='sample time =\s+\d+.\d+ ms /\s+\d+'
26+
SESSION_SIZE_MSG_PATTERN='main: session file matches [[:digit:]]+ / [[:digit:]]+'
27+
SAMPLE_TIME_MSG_PATTERN='sample time =[[:space:]]+[[:digit:]]+.[[:digit:]]+ ms /[[:space:]]+[[:digit:]]+'
2828
SED_DELETE_MESSAGES="/^(${USER_NAME}:|${AI_NAME}:|\\.\\.\\.)/,\$d"
2929

3030
CTX_SIZE=2048

0 commit comments

Comments
 (0)