@@ -129,12 +129,13 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => {
129
129
}
130
130
131
131
event . preventDefault ( ) ;
132
+
132
133
// This is an external URI like "vscode://", so
133
134
// it needs to be opened with the browser protocol handler.
134
- if ( app . external && ! app . url . startsWith ( "http" ) ) {
135
- // If the protocol is external the browser does not
136
- // redirect the user from the page.
135
+ const shouldOpenAppExternally =
136
+ app . external && ! app . url . startsWith ( "http" ) ;
137
137
138
+ if ( shouldOpenAppExternally ) {
138
139
// This is a magic undocumented string that is replaced
139
140
// with a brand-new session token from the backend.
140
141
// This only exists for external URLs, and should only
@@ -149,12 +150,22 @@ export const AppLink: FC<AppLinkProps> = ({ app, workspace, agent }) => {
149
150
setFetchingSessionToken ( false ) ;
150
151
}
151
152
window . location . href = url ;
152
- } else {
153
- window . open (
154
- href ,
155
- Language . appTitle ( appDisplayName , generateRandomString ( 12 ) ) ,
156
- "width=900,height=600" ,
157
- ) ;
153
+ return ;
154
+ }
155
+
156
+ switch ( app . open_in ) {
157
+ case "slim-window" : {
158
+ window . open (
159
+ href ,
160
+ Language . appTitle ( appDisplayName , generateRandomString ( 12 ) ) ,
161
+ "width=900,height=600" ,
162
+ ) ;
163
+ return ;
164
+ }
165
+ default : {
166
+ window . open ( href ) ;
167
+ return ;
168
+ }
158
169
}
159
170
} }
160
171
>
0 commit comments