99 Icon ,
1010 icons ,
1111 Loader ,
12+ MarkdownDisplay ,
1213 NotyService ,
1314 PageContainer ,
1415 PageHeader ,
@@ -23,6 +24,7 @@ import {
2324 ServiceDefinition ,
2425 ServiceStateHistory ,
2526 ServiceStatus ,
27+ StackConfig ,
2628 StackDefinition ,
2729} from 'common'
2830
@@ -149,17 +151,19 @@ export const ServiceDetail = Shade<ServiceDetailProps>({
149151 }
150152
151153 const stackState = useEntitySync ( options , StackDefinition , service . stackName )
154+ const stackConfigState = useEntitySync ( options , StackConfig , service . stackName )
152155 const reposState = useCollectionSync ( options , GitHubRepository , {
153156 filter : { stackName : { $eq : service . stackName } } ,
154157 } )
155158 const repos = reposState . status === 'synced' || reposState . status === 'cached' ? reposState . data . entries : [ ]
156159 const linkedRepo = service . repositoryId ? repos . find ( ( r ) => r . id === service . repositoryId ) : undefined
157- const stackData = stackState . status === 'synced' ? stackState . data : undefined
158- const stack = stackData
160+ const stackDef = stackState . status === 'synced' ? stackState . data : undefined
161+ const stackConfig = stackConfigState . status === 'synced' ? stackConfigState . data : undefined
162+ const stack = stackDef
159163 ? ( {
160- ...stackData ,
161- stackName : ( stackData as Partial < StackView > ) . stackName ?? stackData . name ,
162- mainDirectory : ( stackData as Partial < StackView > ) . mainDirectory ?? '' ,
164+ ...stackDef ,
165+ stackName : stackDef . name ,
166+ mainDirectory : stackConfig ? .mainDirectory ?? '' ,
163167 } as StackView )
164168 : undefined
165169 const fullCwd = stack ? getServiceCwd ( stack , service , linkedRepo ?? null ) : null
@@ -271,7 +275,6 @@ export const ServiceDetail = Shade<ServiceDetailProps>({
271275 < PageContainer >
272276 < PageHeader
273277 title = { service . displayName }
274- description = { service . description }
275278 actions = {
276279 < div style = { { display : 'flex' , alignItems : 'center' , gap : '8px' , flexWrap : 'wrap' } } >
277280 < ServiceStatusIndicator service = { service } />
@@ -300,6 +303,11 @@ export const ServiceDetail = Shade<ServiceDetailProps>({
300303 </ div >
301304 }
302305 />
306+ { service . description ? (
307+ < Paper >
308+ < MarkdownDisplay content = { service . description } />
309+ </ Paper >
310+ ) : null }
303311 < Paper >
304312 < div
305313 style = { {
@@ -331,7 +339,22 @@ export const ServiceDetail = Shade<ServiceDetailProps>({
331339 ) : null }
332340 < strong > Working Directory</ strong >
333341 < span style = { { fontFamily : 'monospace' } } > { fullCwd ?? '(loading…)' } </ span >
334- < span />
342+ { fullCwd ? (
343+ < span style = { { display : 'flex' , gap : '4px' } } >
344+ < a href = { `cursor://file/${ fullCwd } ` } style = { { color : 'inherit' } } >
345+ < Button variant = "outlined" size = "small" title = "Open in Cursor" >
346+ Cursor
347+ </ Button >
348+ </ a >
349+ < a href = { `vscode://file/${ fullCwd } ` } style = { { color : 'inherit' } } >
350+ < Button variant = "outlined" size = "small" title = "Open in VS Code" >
351+ VS Code
352+ </ Button >
353+ </ a >
354+ </ span >
355+ ) : (
356+ < span />
357+ ) }
335358 { service . repositoryId ? (
336359 < div style = { { display : 'contents' } } >
337360 < strong > Clone</ strong >
0 commit comments