Skip to content

Commit 1834347

Browse files
committed
fix: windows clipboard
1 parent 4c0ac8f commit 1834347

File tree

3 files changed

+13
-10
lines changed

3 files changed

+13
-10
lines changed

src/main/agent/execute.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const execute = async (executeParams: ExecuteParams) => {
9494
logger.info(`[execute] [Position] (${startX}, ${startY})`);
9595

9696
// execute configs
97-
mouse.config.mouseSpeed = 1500;
97+
mouse.config.mouseSpeed = 2000;
9898

9999
// if (startBoxStr) {
100100
// const region = await nutScreen.highlight(
@@ -181,9 +181,12 @@ export const execute = async (executeParams: ExecuteParams) => {
181181
if (env.isWindows) {
182182
const originalClipboard = clipboard.readText();
183183
clipboard.writeText(stripContent);
184-
await keyboard.pressKey(Key.LeftControl, Key.V);
184+
await keyboard.pressKey(Key.LeftControl);
185+
await sleep(50);
186+
await keyboard.pressKey(Key.V);
187+
await sleep(50);
185188
await keyboard.releaseKey(Key.LeftControl, Key.V);
186-
await sleep(500);
189+
await sleep(100);
187190
clipboard.writeText(originalClipboard);
188191
} else {
189192
await keyboard.type(stripContent);

src/main/window/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export function createSettingsWindow(
9494
console.log('mainWindowBounds', mainWindowBounds);
9595

9696
const width = 480;
97-
const height = 760;
97+
const height = 700;
9898

9999
let x, y;
100100
if (mainWindowBounds) {

src/renderer/src/pages/settings/index.tsx

+6-6
Original file line numberDiff line numberDiff line change
@@ -57,12 +57,12 @@ const Settings = () => {
5757
duration: 1500,
5858
isClosable: true,
5959
variant: 'ui-tars-success',
60-
onCloseComplete: () => {
61-
dispatch({
62-
type: 'CLOSE_SETTINGS_WINDOW',
63-
payload: null,
64-
});
65-
},
60+
// onCloseComplete: () => {
61+
// dispatch({
62+
// type: 'CLOSE_SETTINGS_WINDOW',
63+
// payload: null,
64+
// });
65+
// },
6666
});
6767
};
6868

0 commit comments

Comments
 (0)