@@ -11,6 +11,36 @@ export function DialogStatus() {
1111
1212 const enabledFormatters = createMemo ( ( ) => sync . data . formatter . filter ( ( f ) => f . enabled ) )
1313
14+ const plugins = createMemo ( ( ) => {
15+ const pluginList = sync . data . config . plugin ?? [ ]
16+ return pluginList . map ( ( plugin ) => {
17+ if ( plugin . startsWith ( "file://" ) ) {
18+ const path = plugin . replace ( "file://" , "" )
19+ const parts = path . split ( "/" )
20+ const filename = parts . pop ( ) || path
21+
22+ // If it's a file with extension (like index.ts or workflow.ts)
23+ if ( filename . includes ( "." ) ) {
24+ const basename = filename . split ( "." ) [ 0 ]
25+ // If the basename is generic (like "index"), use the parent directory name
26+ if ( basename === "index" ) {
27+ const dirname = parts . pop ( )
28+ const name = dirname || basename
29+ return { raw : plugin , name, type : "local" as const }
30+ }
31+ // Otherwise use the basename without extension (like "workflow" from "workflow.ts")
32+ return { raw : plugin , name : basename , type : "local" as const }
33+ }
34+
35+ return { raw : plugin , name : filename , type : "local" as const }
36+ }
37+ const lastAtIndex = plugin . lastIndexOf ( "@" )
38+ const name = lastAtIndex > 0 ? plugin . substring ( 0 , lastAtIndex ) : plugin
39+ const version = lastAtIndex > 0 ? plugin . substring ( lastAtIndex + 1 ) : "latest"
40+ return { raw : plugin , name, version, type : "npm" as const }
41+ } )
42+ } )
43+
1444 return (
1545 < box paddingLeft = { 2 } paddingRight = { 2 } gap = { 1 } paddingBottom = { 1 } >
1646 < box flexDirection = "row" justifyContent = "space-between" >
@@ -99,6 +129,31 @@ export function DialogStatus() {
99129 </ For >
100130 </ box >
101131 </ Show >
132+ < Show when = { plugins ( ) . length > 0 } fallback = { < text fg = { theme . text } > No Plugins</ text > } >
133+ < box >
134+ < text fg = { theme . text } > { plugins ( ) . length } Plugins</ text >
135+ < For each = { plugins ( ) } >
136+ { ( item ) => (
137+ < box flexDirection = "row" gap = { 1 } >
138+ < text
139+ flexShrink = { 0 }
140+ style = { {
141+ fg : theme . success ,
142+ } }
143+ >
144+ •
145+ </ text >
146+ < text wrapMode = "word" fg = { theme . text } >
147+ < b > { item . name } </ b >
148+ < Show when = { item . type === "npm" && item . version } >
149+ < span style = { { fg : theme . textMuted } } > @{ item . version } </ span >
150+ </ Show >
151+ </ text >
152+ </ box >
153+ ) }
154+ </ For >
155+ </ box >
156+ </ Show >
102157 </ box >
103158 )
104159}
0 commit comments