diff --git a/src/apps/chat/components/message/ChatMessage.tsx b/src/apps/chat/components/message/ChatMessage.tsx index 7ce1780c9..039abf2a2 100644 --- a/src/apps/chat/components/message/ChatMessage.tsx +++ b/src/apps/chat/components/message/ChatMessage.tsx @@ -474,14 +474,15 @@ export function ChatMessage(props: { {/* [aside A] Editing: Apply */} {isEditingText && ( + {/* */} - + - {/**/} - {/* Save*/} - {/**/} + + Done + )} @@ -583,11 +584,8 @@ export function ChatMessage(props: { {/* If editing and there's no content, have a button to create a new TextContentFragment */} {isEditingText && !contentFragments.length && ( - )} @@ -618,14 +616,15 @@ export function ChatMessage(props: { {/* Editing: Cancel */} {isEditingText && ( + {/* */} - + - {/**/} - {/* Close*/} - {/**/} + + Cancel + )} diff --git a/src/apps/chat/components/message/fragments-attachment-text/DocumentFragmentEditor.tsx b/src/apps/chat/components/message/fragments-attachment-text/DocumentFragmentEditor.tsx index f703fe6f9..7cd20cb42 100644 --- a/src/apps/chat/components/message/fragments-attachment-text/DocumentFragmentEditor.tsx +++ b/src/apps/chat/components/message/fragments-attachment-text/DocumentFragmentEditor.tsx @@ -13,7 +13,7 @@ import type { DMessageRole } from '~/common/stores/chat/chat.message'; import { createTextAttachmentFragment, DMessageAttachmentFragment, DMessageFragmentId } from '~/common/stores/chat/chat.fragments'; import { marshallWrapText } from '~/common/stores/chat/chat.tokens'; -import { ContentPartTextEdit } from '../fragments-content/ContentPartTextEdit'; +import { PartTextEdit } from '../fragments-content/PartTextEdit'; export function DocumentFragmentEditor(props: { @@ -85,8 +85,8 @@ export function DocumentFragmentEditor(props: { {isEditing ? ( // Document Editor - {props.fragments.map((fragment) => { @@ -76,9 +80,9 @@ export function ContentFragments(props: { switch (fragment.part.pt) { case 'text': return props.textEditsState ? ( - ); case 'error': - return ( + return props.textEditsState ? ( + + ) : ( but with externally controlled state rather than internal. * Made it for as the editing alternative for . */ -export function ContentPartTextEdit(props: { +export function PartTextEdit(props: { // current value - textPart: DMessageTextPart, + textPartText: string, fragmentId: DMessageFragmentId, // visual @@ -77,7 +77,7 @@ export function ContentPartTextEdit(props: { size={props.contentScaling !== 'md' ? 'sm' : undefined} value={(props.editedText !== undefined) ? props.editedText /* self-text */ - : props.textPart.text /* DMessageTextPart text */ + : props.textPartText /* DMessageTextPart text */ } onChange={handleEditTextChanged} onKeyDown={handleEditKeyDown} diff --git a/src/apps/chat/editors/image-generate.ts b/src/apps/chat/editors/image-generate.ts index 2406fdc40..d01d4cef5 100644 --- a/src/apps/chat/editors/image-generate.ts +++ b/src/apps/chat/editors/image-generate.ts @@ -33,7 +33,7 @@ export async function runImageGenerationUpdatingState(cHandler: ConversationHand imageText = imageText.replace(/x(\d+)$|\[(\d+)]$/, '').trim(); // Remove the "xN" or "[N]" part from the imageText const { assistantMessageId, placeholderFragmentId } = cHandler.messageAppendAssistantPlaceholder( - `Give me ${t2iProvider.vendor === 'openai' ? 'a dozen' : 'a few'} seconds while I draw ${imageText?.length > 20 ? 'that' : '"' + imageText + '"'}...`, + `Give me ${t2iProvider.vendor === 'openai' ? 'a minute' : 'a few seconds'} while I draw ${imageText?.length > 20 ? 'that' : '"' + imageText + '"'} with ${t2iProvider.painter}...`, { originLLM: t2iProvider.painter }, ); diff --git a/src/common/app.theme.ts b/src/common/app.theme.ts index ff28a2f32..9b33d4ed5 100644 --- a/src/common/app.theme.ts +++ b/src/common/app.theme.ts @@ -188,7 +188,7 @@ export const themeScalingMap: Record = { blockFontSize: 'xs', blockImageGap: 1, blockLineHeight: 1.666667, - chatMessagePadding: 1.25, + chatMessagePadding: 1, fragmentButtonFontSize: 'xs', chatDrawerItemSx: { '--ListItem-minHeight': '2.25rem', fontSize: 'sm' }, // 36px chatDrawerItemFolderSx: { '--ListItem-minHeight': '2.5rem', fontSize: 'sm' }, // 40px diff --git a/src/common/stores/chat/store-chats.ts b/src/common/stores/chat/store-chats.ts index a15d2b27f..d9411c940 100644 --- a/src/common/stores/chat/store-chats.ts +++ b/src/common/stores/chat/store-chats.ts @@ -366,7 +366,7 @@ export const useChatStore = create()(devtools( // replace the Content.Pl[part.pt='ph'] fragments with Error fragments, to show the aborted ops (instead of just empty blocks) message.fragments = message.fragments.map((fragment: DMessageFragment): DMessageFragment => (isContentFragment(fragment) && fragment.part.pt === 'ph') - ? createErrorContentFragment(`Interrupted: ${fragment.part.pText}`) + ? createErrorContentFragment(`${fragment.part.pText} (did not complete)`) : fragment, ); // cleanup pre-v4 properties