Skip to content

Commit

Permalink
2.12.8
Browse files Browse the repository at this point in the history
  • Loading branch information
Dooy committed Dec 14, 2023
1 parent 3aff7ce commit eb3cacf
Show file tree
Hide file tree
Showing 12 changed files with 422 additions and 20 deletions.
5 changes: 5 additions & 0 deletions changlog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# 功能升级日志

## 2.12.8
- 😄 新增:我的画廊
- 🐞 修复:重试按钮、停止按钮功能 #15


## 2.12.7
- 😄 新增:vercel 增加 AUTH_SECRET_KEY 可以访问输入验证 #15
- 🐞 修复:OPENAI_API_MODEL 默认模型 同时支持 vercel #16
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "chatgpt-web-midjourney-proxy",
"version": "2.12.7",
"version": "2.12.8",
"private": false,
"description": "ChatGPT Web Midjourney Proxy",
"author": "Dooy <[email protected]>",
Expand Down Expand Up @@ -41,7 +41,8 @@
"pinia": "^2.0.33",
"vue": "^3.2.47",
"vue-i18n": "^9.2.2",
"vue-router": "^4.1.6"
"vue-router": "^4.1.6",
"vue-waterfall-plugin-next": "^2.3.1"
},
"devDependencies": {
"@antfu/eslint-config": "^0.35.3",
Expand All @@ -58,6 +59,7 @@
"axios": "^1.3.4",
"crypto-js": "^4.1.1",
"eslint": "^8.35.0",
"http-proxy-middleware": "^2.0.6",
"husky": "^8.0.3",
"less": "^4.1.3",
"lint-staged": "^13.1.2",
Expand All @@ -69,7 +71,6 @@
"typescript": "~4.9.5",
"vite": "^4.2.0",
"vite-plugin-pwa": "^0.14.4",
"http-proxy-middleware": "^2.0.6",
"vue-tsc": "^1.2.0"
},
"lint-staged": {
Expand Down
128 changes: 128 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

21 changes: 18 additions & 3 deletions src/views/chat/components/Message/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { t } from '@/locales'
import { useBasicLayout } from '@/hooks/useBasicLayout'
import { copyToClip } from '@/utils/copy'
import { homeStore } from '@/store'
import { getSeed } from '@/api'
import { getSeed, mlog } from '@/api'
interface Props {
dateTime?: string
Expand All @@ -18,6 +18,7 @@ interface Props {
error?: boolean
loading?: boolean
chat:Chat.Chat
index:number
}
interface Emit {
Expand Down Expand Up @@ -84,6 +85,7 @@ function handleRegenerate() {
emit('regenerate')
}
async function handleCopy(txt?:string) {
try {
await copyToClip( txt|| props.text || '')
Expand Down Expand Up @@ -125,7 +127,13 @@ const sendReload = () => {
// if(seed>0 ) await handleCopy(`${seed}`);
// }
function handleRegenerate2() {
messageRef.value?.scrollIntoView()
//emit('regenerate')
mlog('重新发送!');
homeStore.setMyData({act:'gpt.resubmit', actData:{ index:props.index , uuid:props.chat.uuid } });
}
</script>

<template>
Expand Down Expand Up @@ -166,14 +174,21 @@ const sendReload = () => {
:as-raw-text="asRawText"
:chat="chat"
/>
<div class="flex flex-col" v-if="!chat.mjID">
<div class="flex flex-col" v-if="!chat.mjID && chat.model!='dall-e-3' && chat.model!='dall-e-2' ">
<!-- <button
v-if="!inversion "
class="mb-2 transition text-neutral-300 hover:text-neutral-800 dark:hover:text-neutral-300"
@click="handleRegenerate"
>
<SvgIcon icon="ri:restart-line" />
</button> -->
<button
v-if="!inversion "
class="mb-2 transition text-neutral-300 hover:text-neutral-800 dark:hover:text-neutral-300"
@click="handleRegenerate2"
>
<SvgIcon icon="ri:restart-line" />
</button>
<NDropdown
:trigger="isMobile ? 'click' : 'hover'"
:placement="!inversion ? 'right' : 'left'"
Expand Down
2 changes: 2 additions & 0 deletions src/views/chat/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ watch(()=>homeStore.myData.act,(n)=>{
if(n=='draw') scrollToBottom();
if(n=='scrollToBottom') scrollToBottom();
if(n=='scrollToBottomIfAtBottom') scrollToBottomIfAtBottom();
if(n=='gpt.submit' || n=='gpt.resubmit'){ loading.value = true;}
});
const st =ref({inputme:true});
Expand Down Expand Up @@ -519,6 +520,7 @@ const st =ref({inputme:true});
@regenerate="onRegenerate(index)"
@delete="handleDelete(index)"
:chat="item"
:index="index"
/>
<div class="sticky bottom-0 left-0 flex justify-center">
<NButton v-if="loading" type="warning" @click="handleStop">
Expand Down
3 changes: 2 additions & 1 deletion src/views/chat/layout/Layout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Sider from './sider/index.vue'
import Permission from './Permission.vue'
import { useBasicLayout } from '@/hooks/useBasicLayout'
import { gptConfigStore, homeStore, useAppStore, useAuthStore, useChatStore } from '@/store'
import { aiSider,aiGpts } from '@/views/mj'
import { aiSider,aiGpts ,aiGallery} from '@/views/mj'
const router = useRouter()
const appStore = useAppStore()
Expand Down Expand Up @@ -65,4 +65,5 @@ const getContainerClass = computed(() => {
<Permission :visible="needPermission" />
</div>
<aiGpts/>
<aiGallery/>
</template>
Loading

0 comments on commit eb3cacf

Please sign in to comment.