Skip to content

Commit

Permalink
feat: session action add prompts, close #78 (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
ayangweb committed Mar 23, 2023
1 parent 14d83c3 commit d118471
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src-tauri/Cargo.lock

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

2 changes: 1 addition & 1 deletion src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "chat_gpt"
version = "0.0.5"
version = "0.0.6"
description = "ChatGPT-Desktop"
authors = ["orangelckc", "bilibili-ayang"]
license = "MIT"
Expand Down
46 changes: 31 additions & 15 deletions src/components/Session/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ watch(currentSession, () => {
</script>

<template>
<!-- TODO: 拆分优化组件 -->
<div
ref="sessionElement"
id="session-list"
Expand Down Expand Up @@ -111,21 +112,36 @@ watch(currentSession, () => {
: 'right-0 translate-x-full pl-2'
"
>
<div
class="copy"
:id="`copy-${item.id}`"
@click="
copyText($event, { nodeId: `session-content-${item.id}` })
"
></div>

<div
class="markdown"
:id="`markdown-${item.id}`"
@click="saveMarkdown($event, item.message.content)"
></div>

<icon-image @click="saveImage(`session-data-${item.id}`)" />
<a-tooltip
content="复制"
:position="item.is_ask ? 'right' : 'left'"
>
<div
class="copy"
:id="`copy-${item.id}`"
@click="
copyText($event, { nodeId: `session-content-${item.id}` })
"
></div>
</a-tooltip>

<a-tooltip
content="导出 Markdown 文件"
:position="item.is_ask ? 'right' : 'left'"
>
<div
class="markdown"
:id="`markdown-${item.id}`"
@click="saveMarkdown($event, item.message.content)"
></div>
</a-tooltip>

<a-tooltip
content="导出图片"
:position="item.is_ask ? 'right' : 'left'"
>
<icon-image @click="saveImage(`session-data-${item.id}`)" />
</a-tooltip>
</div>

<div
Expand Down
1 change: 0 additions & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import AutoImport from 'unplugin-auto-import/vite'
import Components from 'unplugin-vue-components/vite'
import { ArcoResolver } from 'unplugin-vue-components/resolvers'
import { visualizer } from 'rollup-plugin-visualizer'
import * as myTypes from './src/types'

export default defineConfig(async () => ({
plugins: [
Expand Down

0 comments on commit d118471

Please sign in to comment.