-
+
+
+
+
+
diff --git a/src/assets/clear.svg b/src/assets/clear.svg
new file mode 100644
index 0000000..1b7e986
--- /dev/null
+++ b/src/assets/clear.svg
@@ -0,0 +1,4 @@
+
diff --git a/src/components/HelloWorld.vue b/src/components/HelloWorld.vue
deleted file mode 100644
index f5e4f53..0000000
--- a/src/components/HelloWorld.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
- {{ msg }}
-
-
-
-
- Edit
- components/HelloWorld.vue to test HMR
-
-
-
-
- Check out
- create-vue, the official Vue + Vite starter
-
-
- Install
- Volar
- in your IDE for a better DX
-
- Click on the Vite and Vue logos to learn more
-
-
-
diff --git a/src/components/chat.vue b/src/components/chat.vue
new file mode 100644
index 0000000..8304e09
--- /dev/null
+++ b/src/components/chat.vue
@@ -0,0 +1,123 @@
+
+
+
+
+
![]()
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/chatContent.vue b/src/components/chatContent.vue
new file mode 100644
index 0000000..38973bd
--- /dev/null
+++ b/src/components/chatContent.vue
@@ -0,0 +1,94 @@
+
+
+
+
+
+
+
![表情]()
+
+
+
+
+
+
![]()
+
{{ item.name }}
+
{{ item.time }}
+
+
+
+
+ {{ item.msg }}
+
+
+
![表情]()
+
+
+
+
+
+
{{ item.name }}
+
{{ item.time }}
+
![]()
+
+
+
+
+
+
+
+
+
diff --git a/src/components/chatInput.vue b/src/components/chatInput.vue
new file mode 100644
index 0000000..5e6464c
--- /dev/null
+++ b/src/components/chatInput.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/src/components/settings.vue b/src/components/settings.vue
new file mode 100644
index 0000000..4988ff2
--- /dev/null
+++ b/src/components/settings.vue
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
diff --git a/src/components/thinkingBar.vue b/src/components/thinkingBar.vue
new file mode 100644
index 0000000..6b9003e
--- /dev/null
+++ b/src/components/thinkingBar.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
diff --git a/src/main.js b/src/main.js
index ed437c6..3a83c0f 100644
--- a/src/main.js
+++ b/src/main.js
@@ -1,20 +1,10 @@
-import { createApp } from 'vue'
-import './style.css'
+import ElementPlus from 'element-plus'
+import 'element-plus/dist/index.css'
+import {createApp} from 'vue'
import App from './App.vue'
-import ElementUI from 'element-ui';
-import VueRouter from 'vue-router'
-import 'element-ui/lib/theme-chalk/index.css';
-import router from './router/index'
-import { copyToClipboard } from '@/util/util'
-import i18n from '@/config/i18n'
-Vue.use(VueRouter)
-Vue.config.productionTip = false
-Vue.use(ElementUI);
+import axios from "./utils/axios";
-/**
- * 复制
- */
-const ins = createApp(App)
-ins.use(VueRouter)
-ins.use(ElementUI)
-ins.mount('#app')
+const app = createApp(App)
+app.config.globalProperties.$http = axios
+app.use(ElementPlus)
+app.mount('#app')
diff --git a/src/style.css b/src/style.css
deleted file mode 100644
index 84a0050..0000000
--- a/src/style.css
+++ /dev/null
@@ -1,89 +0,0 @@
-:root {
- font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
- line-height: 1.5;
- font-weight: 400;
-
- color-scheme: light dark;
- color: rgba(255, 255, 255, 0.87);
- background-color: #242424;
-
- font-synthesis: none;
- text-rendering: optimizeLegibility;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- -webkit-text-size-adjust: 100%;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-a {
- font-weight: 500;
- color: #646cff;
- text-decoration: inherit;
-}
-a:hover {
- color: #535bf2;
-}
-
-body {
- margin: 0;
- display: flex;
- place-items: center;
- min-width: 320px;
- min-height: 100vh;
-}
-
-h1 {
- font-size: 3.2em;
- line-height: 1.1;
-}
-
-button {
- border-radius: 8px;
- border: 1px solid transparent;
- padding: 0.6em 1.2em;
- font-size: 1em;
- font-weight: 500;
- font-family: inherit;
- background-color: #1a1a1a;
- cursor: pointer;
- transition: border-color 0.25s;
-}
-button:hover {
- border-color: #646cff;
-}
-button:focus,
-button:focus-visible {
- outline: 4px auto -webkit-focus-ring-color;
-}
-
-.card {
- padding: 2em;
-}
-
-#app {
- max-width: 1280px;
- margin: 0 auto;
- padding: 2rem;
- text-align: center;
-}
-
-@media (prefers-color-scheme: light) {
- :root {
- color: #213547;
- background-color: #ffffff;
- }
- a:hover {
- color: #747bff;
- }
- button {
- background-color: #f9f9f9;
- }
-}
diff --git a/src/utils/axios.js b/src/utils/axios.js
new file mode 100644
index 0000000..3936340
--- /dev/null
+++ b/src/utils/axios.js
@@ -0,0 +1,6 @@
+import axios from "axios";
+
+const ins = axios.create({
+
+})
+export default ins
diff --git a/src/utils/env.js b/src/utils/env.js
new file mode 100644
index 0000000..90eb2e5
--- /dev/null
+++ b/src/utils/env.js
@@ -0,0 +1,7 @@
+export const OPEN_AI_KEY = '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'
+//ai头像
+export const AI_AVATAR = "https://th.bing.com/th?id=ODL.3e2fbff4543f0d3632d34be6d02adc93&w=100&h=100&c=12&pcl=faf9f7&o=6&dpr=1.5&pid=13.1"
+//用户头像
+export const USER_AVATAR = "https://avatars.githubusercontent.com/u/20533272?v=4"
+
+
diff --git a/src/utils/models.js b/src/utils/models.js
new file mode 100644
index 0000000..ca0eb4b
--- /dev/null
+++ b/src/utils/models.js
@@ -0,0 +1,31 @@
+import {AI_AVATAR} from "./env";
+
+class BaseModel {
+ constructor(props) {
+ for (const k in props) {
+ this[k] = props[k];
+ }
+ }
+}
+
+export class ChatGPT extends BaseModel {
+ constructor() {
+ super({
+ avatar: AI_AVATAR,
+ name: 'ChatGPT',
+ id: "gpt-3.5-turbo",
+ desc: "ChatGPT-3.5所基于的模型"
+ });
+ }
+}
+
+export class ChatGLM extends BaseModel {
+ constructor() {
+ super({
+ avatar: AI_AVATAR,
+ name: 'ChatGLM',
+ id: "chatglm-6b",
+ desc: "ChatGLM-6B所基于的模型"
+ });
+ }
+}
diff --git a/src/utils/tools.js b/src/utils/tools.js
new file mode 100644
index 0000000..2d17e58
--- /dev/null
+++ b/src/utils/tools.js
@@ -0,0 +1,25 @@
+/**
+ * 复制到剪切板
+ */
+
+export function copyToClipboard(content) {
+ const clipboardData = window.clipboardData
+ if (clipboardData) {
+ clipboardData.clearData()
+ clipboardData.setData('Text', content)
+ return true
+ } else if (document.execCommand) {
+ const el = document.createElement('textarea')
+ el.value = content
+ el.setAttribute('readonly', '')
+ el.style.position = 'absolute'
+ el.style.left = '-9999px'
+ document.body.appendChild(el)
+ el.select()
+ document.execCommand('copy')
+ document.body.removeChild(el)
+ return true
+ }
+ return false
+
+}
diff --git a/vite.config.js b/vite.config.js
index 05c1740..ada4277 100644
--- a/vite.config.js
+++ b/vite.config.js
@@ -1,7 +1,15 @@
-import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
+import {defineConfig} from 'vite'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [vue()],
+ resolve: {
+ extensions: ['.mjs', '.js', '.mts', '.json', '.vue']
+ },
+ server: {
+ open: true,
+ host: '0.0.0.0',
+ port: 10109
+ }
})