chatgpt-web icon indicating copy to clipboard operation
chatgpt-web copied to clipboard

编辑我发送的消息

Open Jacobabc123 opened this issue 1 year ago • 3 comments

能增加个编辑我发送的消息的功能吗

Jacobabc123 avatar Apr 03 '23 21:04 Jacobabc123

chatgpt-web-main\src\views\chat\components\Message\index.vue目录下 interface Emit { (ev: 'regenerate'): void (ev: 'delete'): void (ev: 'quote'): void }

const common = [ { label: t('chat.quote'), key: 'quoteText', icon: iconRender({ icon: 'ri-chat-quote-line' }), }, { label: t('chat.copy'), key: 'copyText', icon: iconRender({ icon: 'ri:file-copy-2-line' }), }, { label: t('common.delete'), key: 'delete', icon: iconRender({ icon: 'ri:delete-bin-line' }), }, ]

function handleSelect(key: 'copyText' | 'delete' | 'toggleRenderType' | 'quoteText') { switch (key) { case 'copyText': copyText({ text: props.text ?? '' }) return case 'toggleRenderType': asRawText.value = !asRawText.value return case 'quoteText': emit('quote') return case 'delete': emit('delete') } }

chatgpt-web-main\src\views\chat\index.vue <Message v-for="(item, index) of dataSources" :key="index" :date-time="item.dateTime" :text="item.text" :inversion="item.inversion" :error="item.error" :loading="item.loading" @quote="quoteText(item.text)" @regenerate="onRegenerate(index)" @delete="handleDelete(index)" />

function quoteText(text: string) { prompt.value = text }

chatgpt-web-main\src\locales\zh-CN.ts
chat: { placeholder: '来说点什么吧...(Shift + Enter = 换行)', placeholderMobile: '来说点什么...', quote: '引用',
} 相应文件修改下,实现一个类似微信的引用功能,将上文的信息引用到输入框后可以进行编辑

xiaomenggit avatar Apr 04 '23 01:04 xiaomenggit

#1198

huajiao238 avatar Apr 04 '23 09:04 huajiao238

This issue is stale because it has been open for 10 days with no activity.

github-actions[bot] avatar Apr 15 '23 02:04 github-actions[bot]