feat: add timestamp and forking
This commit is contained in:
@@ -12,6 +12,7 @@ const emit = defineEmits<{
|
||||
delete: [];
|
||||
edit: [value: string];
|
||||
patch: [updates: Partial<Message>];
|
||||
fork: [];
|
||||
}>();
|
||||
|
||||
let reqAbortController: AbortController | null = null;
|
||||
@@ -126,6 +127,10 @@ const handleEdit = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
const forkMessage = () => {
|
||||
emit('fork');
|
||||
};
|
||||
|
||||
const deleteMessage = () => {
|
||||
emit('delete');
|
||||
};
|
||||
@@ -205,6 +210,10 @@ const navigateChild = (direction: -1 | 1) => {
|
||||
class="flex justify-center items-center w-7 h-6 @hover:bg-[var(--color-hover)]">
|
||||
<span :class="copied ? 'i-mynaui-check text-emerald-500' : 'i-mynaui-copy text-4.5'"></span>
|
||||
</button>
|
||||
<button @click="forkMessage"
|
||||
class="flex justify-center items-center w-7 h-6 @hover:bg-[var(--color-hover)]">
|
||||
<span class="i-mynaui-git-branch text-4.5"></span>
|
||||
</button>
|
||||
<Tooltip :hotkey="['ctrl', 'shift', 'backspace']">
|
||||
<button @click="deleteMessage"
|
||||
class="flex justify-center items-center w-7 h-6 text-red-500 @hover:bg-[var(--color-hover)]">
|
||||
|
||||
Reference in New Issue
Block a user