File tree Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Expand file tree Collapse file tree 2 files changed +13
-6
lines changed Original file line number Diff line number Diff line change @@ -21,8 +21,6 @@ import { runAgent } from './runAgent';
21
21
import { SettingStore } from './setting' ;
22
22
import { AppState } from './types' ;
23
23
24
- const abortController = new AbortController ( ) ;
25
-
26
24
export const store = createStore < AppState > (
27
25
( set , get ) =>
28
26
( {
@@ -35,7 +33,7 @@ export const store = createStore<AppState>(
35
33
getSetting : ( key ) => SettingStore . get ( key ) ,
36
34
ensurePermissions : { } ,
37
35
38
- abortController,
36
+ abortController : null ,
39
37
thinking : false ,
40
38
41
39
// dispatch for renderer
@@ -83,7 +81,11 @@ export const store = createStore<AppState>(
83
81
} ,
84
82
85
83
RUN_AGENT : async ( ) => {
86
- set ( { thinking : true } ) ;
84
+ if ( get ( ) . thinking ) {
85
+ return ;
86
+ }
87
+
88
+ set ( { abortController : new AbortController ( ) , thinking : true } ) ;
87
89
88
90
await runAgent ( set , get ) ;
89
91
@@ -92,7 +94,7 @@ export const store = createStore<AppState>(
92
94
STOP_RUN : ( ) => {
93
95
set ( { status : StatusEnum . END , thinking : false } ) ;
94
96
showWindow ( ) ;
95
- abortController . abort ( ) ;
97
+ get ( ) . abortController ? .abort ( ) ;
96
98
97
99
closeScreenMarker ( ) ;
98
100
} ,
Original file line number Diff line number Diff line change @@ -15,7 +15,12 @@ export default function Header({ className }: { className?: string }) {
15
15
< Box position = "relative" textAlign = "center" className = { className } >
16
16
< Flex alignItems = "center" justifyContent = "center" >
17
17
< HStack >
18
- < Image alt = "UI-TARS Logo" src = { logoVector } h = "40px" />
18
+ < Image
19
+ alt = "UI-TARS Logo"
20
+ src = { logoVector }
21
+ h = "40px"
22
+ draggable = { false }
23
+ />
19
24
</ HStack >
20
25
< Box position = "absolute" right = "4" >
21
26
< IconButton
You can’t perform that action at this time.
0 commit comments