Skip to content
This repository was archived by the owner on Jan 3, 2026. It is now read-only.

Commit 2475f37

Browse files
authored
Merge pull request #15 from CKylinMC/dev
Version 1.1.0
2 parents 5f1c761 + 0f62bf6 commit 2475f37

File tree

15 files changed

+1004
-630
lines changed

15 files changed

+1004
-630
lines changed

components.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
// @ts-nocheck
33
// Generated by unplugin-vue-components
44
// Read more: https://github.com/vuejs/core/pull/3399
5+
// biome-ignore lint: disable
56
export {}
67

78
/* prettier-ignore */

package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "pasteme",
33
"private": true,
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -11,22 +11,22 @@
1111
"bump": "tsx .scripts/bump.ts"
1212
},
1313
"dependencies": {
14-
"@ai-sdk/openai": "^1.1.12",
15-
"@ai-sdk/openai-compatible": "^0.1.10",
16-
"@ai-sdk/vue": "^1.1.17",
17-
"@tailwindcss/vite": "^4.0.6",
14+
"@ai-sdk/openai": "^1.1.13",
15+
"@ai-sdk/openai-compatible": "^0.1.11",
16+
"@ai-sdk/vue": "^1.1.18",
17+
"@tailwindcss/vite": "^4.0.8",
1818
"@tauri-apps/api": "^2.2.0",
19-
"@tauri-apps/plugin-autostart": "~2",
20-
"@tauri-apps/plugin-clipboard-manager": "~2",
21-
"@tauri-apps/plugin-global-shortcut": "~2",
22-
"@tauri-apps/plugin-http": "~2",
19+
"@tauri-apps/plugin-autostart": "~2.2.0",
20+
"@tauri-apps/plugin-clipboard-manager": "~2.2.1",
21+
"@tauri-apps/plugin-global-shortcut": "~2.2.0",
22+
"@tauri-apps/plugin-http": "~2.3.0",
2323
"@tauri-apps/plugin-opener": "^2.2.5",
2424
"@tauri-apps/plugin-process": "^2.2.0",
25-
"@tauri-apps/plugin-store": "~2",
26-
"@tauri-apps/plugin-stronghold": "~2",
27-
"@tauri-apps/plugin-updater": "~2",
25+
"@tauri-apps/plugin-store": "~2.2.0",
26+
"@tauri-apps/plugin-stronghold": "~2.2.0",
27+
"@tauri-apps/plugin-updater": "~2.5.0",
2828
"@tavily/core": "^0.3.1",
29-
"ai": "^4.1.41",
29+
"ai": "^4.1.45",
3030
"marked": "^15.0.7",
3131
"tailwindcss-animated": "^2.0.0",
3232
"vue": "^3.5.13",
@@ -41,15 +41,15 @@
4141
"@vitejs/plugin-vue": "^5.2.1",
4242
"autoprefixer": "^10.4.20",
4343
"naive-ui": "^2.41.0",
44-
"postcss": "^8.5.2",
44+
"postcss": "^8.5.3",
4545
"semver": "^7.7.1",
46-
"tailwindcss": "^4.0.6",
47-
"tsx": "^4.19.2",
46+
"tailwindcss": "^4.0.8",
47+
"tsx": "^4.19.3",
4848
"typescript": "~5.7.3",
49-
"unplugin-icons": "^22.0.0",
50-
"unplugin-vue-components": "^28.1.0",
49+
"unplugin-icons": "^22.1.0",
50+
"unplugin-vue-components": "^28.4.0",
5151
"vfonts": "^0.1.0",
52-
"vite": "^6.1.0",
52+
"vite": "^6.1.1",
5353
"vue-tsc": "^2.2.2",
5454
"zod": "^3.24.2"
5555
}

src-tauri/Cargo.lock

Lines changed: 7 additions & 47 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src-tauri/Cargo.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "pasteme"
3-
version = "1.0.0"
3+
version = "1.1.0"
44
description = "A simple clipboard manager"
55
authors = ["CKylinMC"]
66
edition = "2021"
@@ -23,7 +23,6 @@ tauri-plugin-opener = "2"
2323
window-vibrancy = "0.5.3"
2424
serde = { version = "1", features = ["derive"] }
2525
serde_json = "1"
26-
mouse_position = "0.1.3"
2726
tauri-plugin-clipboard-manager = "2"
2827
tauri-plugin-store = "2"
2928
tauri-plugin-process = "2"

src-tauri/src/lib.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,10 @@
11
mod tray;
22

33
use enigo::{Direction, Enigo, Key, Keyboard, Settings};
4-
use mouse_position::mouse_position::Mouse;
54
use tauri::{AppHandle, Manager};
65
use tauri_plugin_autostart::MacosLauncher;
76
use window_vibrancy::{apply_acrylic, apply_mica};
87

9-
#[tauri::command]
10-
fn get_mouse_position() -> Vec<i32> {
11-
let position = Mouse::get_mouse_position();
12-
match position {
13-
Mouse::Position { x, y } => vec![x, y],
14-
Mouse::Error => {
15-
println!("Error getting mouse position");
16-
vec![]
17-
}
18-
}
19-
}
20-
218
#[tauri::command]
229
async fn input_text(text: &str) -> Result<(), String> {
2310
let mut enigo = Enigo::new(&Settings::default()).unwrap();
@@ -77,7 +64,6 @@ pub fn run() {
7764
})
7865
.plugin(tauri_plugin_opener::init())
7966
.invoke_handler(tauri::generate_handler![
80-
get_mouse_position,
8167
input_text,
8268
simulate_paste
8369
])

src-tauri/tauri.conf.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"$schema": "https://schema.tauri.app/config/2",
33
"productName": "PasteMe",
4-
"version": "1.0.0",
4+
"version": "1.1.0",
55
"identifier": "in.ckyl.pasteme",
66
"build": {
77
"beforeDevCommand": "yarn dev",

src/AppInfo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
export const AppInfo = {
2-
version: "1.0.0",
2+
version: "1.1.0",
33
};

src/composables/useConfig.ts

Lines changed: 61 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ export interface AIConfig {
88
apiKey: string;
99
endpoint: string;
1010
model: string;
11+
enableToJson: boolean;
12+
enableAskAI: boolean;
13+
enableAICreation: boolean;
14+
enableAIChat: boolean;
15+
enableAISnipets: boolean;
1116
persistChatHistory: boolean;
1217
enableImage: boolean;
1318
imageAIEndpoint: string;
14-
imageApiKey:string;
19+
imageApiKey: string;
1520
imageModel: string;
1621
enableWebsearch: boolean;
1722
tavilyApiKey: string;
@@ -26,11 +31,25 @@ export interface Snippet {
2631
prompt: string;
2732
}
2833

34+
export interface CommonConfig {
35+
enablePaste: boolean;
36+
enableCalc: boolean;
37+
enableEdit: boolean;
38+
enableToText: boolean;
39+
}
40+
41+
export interface DetectConfig {
42+
enabled: boolean;
43+
detectUrl: boolean;
44+
}
45+
2946
export interface Config {
3047
globalShortcut: string;
3148
ai: AIConfig;
3249
chatHistory?: CoreMessage[];
3350
snippets: Snippet[];
51+
common: CommonConfig;
52+
detect: DetectConfig;
3453
}
3554

3655
export function useConfig() {
@@ -42,6 +61,11 @@ export function useConfig() {
4261
apiKey: '',
4362
endpoint: 'https://api.openai.com/v1',
4463
model: 'gpt-4o',
64+
enableToJson: true,
65+
enableAskAI: true,
66+
enableAICreation: true,
67+
enableAIChat: true,
68+
enableAISnipets: true,
4569
persistChatHistory: false,
4670
enableImage: false,
4771
imageAIEndpoint: 'https://api.openai.com/v1',
@@ -52,6 +76,16 @@ export function useConfig() {
5276
enableWebCrawl: false,
5377
jinaApiKey: '',
5478
},
79+
common: {
80+
enablePaste: true,
81+
enableCalc: true,
82+
enableEdit: true,
83+
enableToText: true,
84+
},
85+
detect: {
86+
enabled: false,
87+
detectUrl: false,
88+
},
5589
snippets: [],
5690
chatHistory: []
5791
});
@@ -67,6 +101,11 @@ export function useConfig() {
67101
apiKey: (await store.get('ai.apiKey')) || '',
68102
endpoint: (await store.get('ai.endpoint')) || 'https://api.openai.com/v1',
69103
model: (await store.get('ai.model')) || 'gpt-4o',
104+
enableToJson: !!(await store.get('ai.enableToJson') ?? true),
105+
enableAskAI: !!(await store.get('ai.enableAskAI') ?? true),
106+
enableAICreation: !!(await store.get('ai.enableAICreation') ?? true),
107+
enableAIChat: !!(await store.get('ai.enableAIChat') ?? true),
108+
enableAISnipets: !!(await store.get('ai.enableAISnipets') ?? true),
70109
persistChatHistory: !!(await store.get('ai.persistChatHistory')),
71110
enableImage: !!(await store.get('ai.enableImage')),
72111
imageAIEndpoint: (await store.get('ai.imageAIEndpoint')) || 'https://api.openai.com/v1',
@@ -77,6 +116,16 @@ export function useConfig() {
77116
enableWebCrawl: !!(await store.get('ai.enableWebCrawl')),
78117
jinaApiKey: (await store.get('ai.jinaApiKey')) || '',
79118
};
119+
config.value.detect = {
120+
enabled: !!(await store.get('detect.enabled') ?? true),
121+
detectUrl: !!(await store.get('detect.detectUrl') ?? true),
122+
};
123+
config.value.common = {
124+
enablePaste: !!(await store.get('common.enablePaste') ?? true),
125+
enableCalc: !!(await store.get('common.enableCalc') ?? true),
126+
enableEdit: !!(await store.get('common.enableEdit') ?? true),
127+
enableToText: !!(await store.get('common.enableToText') ?? true),
128+
};
80129
config.value.snippets = tryParse(await store.get('snippets') || "[]", [
81130
{
82131
id: 'intro',
@@ -99,6 +148,11 @@ export function useConfig() {
99148
await store.set('ai.apiKey', config.value.ai.apiKey);
100149
await store.set('ai.endpoint', config.value.ai.endpoint);
101150
await store.set('ai.model', config.value.ai.model);
151+
await store.set('ai.enableToJson', config.value.ai.enableToJson);
152+
await store.set('ai.enableAskAI', config.value.ai.enableAskAI);
153+
await store.set('ai.enableAICreation', config.value.ai.enableAICreation);
154+
await store.set('ai.enableAIChat', config.value.ai.enableAIChat);
155+
await store.set('ai.enableAISnipets', config.value.ai.enableAISnipets);
102156
await store.set('ai.persistChatHistory', config.value.ai.persistChatHistory);
103157
await store.set('ai.enableImage', config.value.ai.enableImage);
104158
await store.set('ai.imageAIEndpoint', config.value.ai.imageAIEndpoint);
@@ -108,6 +162,12 @@ export function useConfig() {
108162
await store.set('ai.tavilyApiKey', config.value.ai.tavilyApiKey);
109163
await store.set('ai.enableWebCrawl', config.value.ai.enableWebCrawl);
110164
await store.set('ai.jinaApiKey', config.value.ai.jinaApiKey);
165+
await store.set('detect.enabled', config.value.detect.enabled);
166+
await store.set('detect.detectUrl', config.value.detect.detectUrl);
167+
await store.set('common.enablePaste', config.value.common.enablePaste);
168+
await store.set('common.enableCalc', config.value.common.enableCalc);
169+
await store.set('common.enableEdit', config.value.common.enableEdit);
170+
await store.set('common.enableToText', config.value.common.enableToText);
111171
await store.set('snippets', JSON.stringify(Array.isArray(config.value.snippets) ? config.value.snippets : []));
112172
await store.set('chatHistory', JSON.stringify(Array.isArray(config.value.chatHistory) ? config.value.chatHistory : []));
113173
await store.save();

0 commit comments

Comments
 (0)