@@ -218,15 +218,10 @@ function SearchResultItem({
218218 ) ;
219219}
220220
221- function getPeekFields ( match : SearchMatch ) {
222- const navigationTitle = `Peek ${ match . type } result` ;
223- const matchTitle = `${ match . repository } ${ match . repoStars ? `(${ match . repoStars } ★)` : "" } ` ;
224- return { navigationTitle, matchTitle } ;
225- }
226-
227221function MultiResultPeek ( { searchResult } : { searchResult : { url : string ; match : ContentMatch | SymbolMatch } } ) {
228222 const { match } = searchResult ;
229- const { navigationTitle, matchTitle } = getPeekFields ( match ) ;
223+ const navigationTitle = `Peek ${ match . type } results` ;
224+ const matchTitle = `${ match . repository } ${ match . repoStars ? `(${ match . repoStars } ★)` : "" } ` ;
230225
231226 // Match types with expanded peek support
232227 switch ( match . type ) {
@@ -267,7 +262,8 @@ function MultiResultPeek({ searchResult }: { searchResult: { url: string; match:
267262
268263function PeekSearchResult ( { searchResult } : { searchResult : SearchResult } ) {
269264 const { match } = searchResult ;
270- const { navigationTitle, matchTitle } = getPeekFields ( match ) ;
265+ const navigationTitle = `Peek ${ match . type } result` ;
266+ const matchTitle = `**${ match . repository } ** ${ match . repoStars ? `- ${ match . repoStars } ★` : "" } ` ;
271267
272268 // Match types that use markdown view support
273269 let markdownContent = "" ;
@@ -279,29 +275,29 @@ function PeekSearchResult({ searchResult }: { searchResult: SearchResult }) {
279275 case "repo" :
280276 markdownContent = `> ${ match . private ? "Private" : "Public" } ${ match . type } match
281277
282- ---
283-
284- ${ match . description || "" } `;
278+ ---
279+
280+ ${ match . description || "" } `;
285281 break ;
286282
287283 case "path" :
288284 markdownContent = `> ${ match . type } match
289-
290- ---
291-
292- \`${ match . path } \`
293- `;
285+
286+ ---
287+
288+ \`${ match . path } \`
289+ ` ;
294290 break ;
295291
296292 case "commit" :
297293 markdownContent = `> ${ match . type } match in ${ match . detail }
298294
299- ---
300-
301- ${ match . label }
302-
303- ${ match . content }
304- `;
295+ ---
296+
297+ ${ match . label }
298+
299+ ${ match . content }
300+ ` ;
305301 break ;
306302
307303 default :
@@ -310,13 +306,13 @@ function PeekSearchResult({ searchResult }: { searchResult: SearchResult }) {
310306\`\`\`
311307${ JSON . stringify ( match , null , " " ) }
312308\`\`\`
313- `;
309+ ` ;
314310 }
315311
316312 return (
317313 < Detail
318314 navigationTitle = { navigationTitle }
319- markdown = { `## ${ matchTitle } \n\n${ markdownContent } ` }
315+ markdown = { `${ matchTitle } \n\n${ markdownContent } ` }
320316 actions = { < ActionPanel > { resultActions ( searchResult . url ) } </ ActionPanel > }
321317 > </ Detail >
322318 ) ;
0 commit comments