diff --git a/src/components/chat/Message.vue b/src/components/chat/Message.vue new file mode 100644 index 0000000..32d9754 --- /dev/null +++ b/src/components/chat/Message.vue @@ -0,0 +1,93 @@ + + + + + diff --git a/src/components/common/MarkdownRenderer.vue b/src/components/common/MarkdownRenderer.vue index bf6482a..baa5c20 100644 --- a/src/components/common/MarkdownRenderer.vue +++ b/src/components/common/MarkdownRenderer.vue @@ -31,7 +31,8 @@ export default defineComponent({ .markdown-body { background: none; padding-top: 3px; - color: var(--el-text-color-primary); + color: inherit; + // color: var(--el-text-color-primary); ol { list-style: initial; } diff --git a/src/operators/message/models.ts b/src/operators/message/models.ts index 0fcf9ba..a74b66a 100644 --- a/src/operators/message/models.ts +++ b/src/operators/message/models.ts @@ -17,9 +17,14 @@ export enum IMessageState { FAILED = 'failed' } +export const ROLE_SYSTEM = 'system'; +export const ROLE_ASSISTANT = 'assistant'; +export const ROLE_USER = 'user'; + export interface IMessage { state?: IMessageState; - content: IContent; - author: IUser | IBot; + content: string; + author?: IUser | IBot; + role?: typeof ROLE_SYSTEM | typeof ROLE_ASSISTANT | typeof ROLE_USER; error?: IError; } diff --git a/src/pages/chat/Conversation.vue b/src/pages/chat/Conversation.vue index 18acd73..f7a4339 100644 --- a/src/pages/chat/Conversation.vue +++ b/src/pages/chat/Conversation.vue @@ -1,3 +1,49 @@ + + + +