Skip to content

Commit ff69c01

Browse files
committed
Simplify prompt symbols in checkpoint descriptions within the history command
- do we simplify symbols in history entires? ├── apps │ └── editor │ └── src │ ├── commands │ │ └── history-command │ │ ├── actions │ │ │ ├── clear-all-checkpoints.ts │ │ │ ├── create-temporary-checkpoint.ts │ │ │ ├── delete-checkpoint-with-undo.ts │ │ │ ├── restore-checkpoint.ts │ │ │ ├── sync-workspace-from-dir.ts │ │ │ ├── toggle-checkpoint-pin.ts │ │ │ └── update-checkpoint-description.ts │ │ ├── history-command.ts │ │ ├── index.ts │ │ └── utils │ │ └── sync-directory.ts │ └── utils │ └── commit-message-details.ts └── packages ├── shared │ └── src │ └── utils │ └── simplify-prompt-symbols │ └── simplify-prompt-symbols.spec.ts └── ui └── src └── components └── editor └── prompt ├── ResponsePreview │ └── ResponsePreview.tsx └── Responses └── Responses.tsx
1 parent d4f98a0 commit ff69c01

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎apps/editor/src/commands/history-command/history-command.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import {
2323
import { PromptViewProvider } from '@/views/prompt/backend/prompt-view-provider'
2424
import { get_checkpoint_path } from '@/features/checkpoints/utils'
2525
import { get_response_preview_promise_resolve } from '@/commands/apply-response-command/utils/preview'
26+
import { simplify_prompt_symbols } from '@shared/utils/simplify-prompt-symbols'
2627

2728
dayjs.extend(relativeTime)
2829

@@ -142,7 +143,9 @@ export const history_command = (params: {
142143
id: c.timestamp.toString(),
143144
label: label_text,
144145
description: `${dayjs(c.timestamp).fromNow()}`,
145-
detail: c.description,
146+
detail: c.description
147+
? simplify_prompt_symbols({ prompt: c.description })
148+
: undefined,
146149
checkpoint: c,
147150
buttons: [
148151
{

0 commit comments

Comments
 (0)