File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -850,6 +850,7 @@ function useChatMarkdownState({
850850 fileLinkParentSuffixByPath ,
851851 )
852852 }
853+ wrapLabel = { label !== undefined }
853854 copyMarkdown = { copyMarkdown }
854855 theme = { resolvedTheme }
855856 threadRef = { threadRef }
Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { WorkspaceEntryIcon } from "./WorkspaceEntryIcon";
55export function FileTagChipContent ( props : {
66 path : string ;
77 label : string ;
8+ wrapLabel ?: boolean | undefined ;
89 theme : "light" | "dark" ;
910 environmentId ?: EnvironmentId | null | undefined ;
1011 cwd ?: string | undefined ;
@@ -17,7 +18,13 @@ export function FileTagChipContent(props: {
1718 cwd = { props . cwd }
1819 theme = { props . theme }
1920 />
20- < ContextChipLabel > { props . label } </ ContextChipLabel >
21+ < ContextChipLabel
22+ className = {
23+ props . wrapLabel ? "overflow-visible whitespace-normal break-all text-left" : undefined
24+ }
25+ >
26+ { props . label }
27+ </ ContextChipLabel >
2128 </ >
2229 ) ;
2330}
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ interface MarkdownFileLinkProps {
3333 panelPath : string | null ;
3434 line ?: number | undefined ;
3535 label : string ;
36+ wrapLabel ?: boolean | undefined ;
3637 copyMarkdown : string ;
3738 theme : "light" | "dark" ;
3839 threadRef ?: ScopedThreadRef | undefined ;
@@ -57,6 +58,7 @@ export const MarkdownFileLink = memo(function MarkdownFileLink({
5758 panelPath,
5859 line,
5960 label,
61+ wrapLabel,
6062 copyMarkdown,
6163 theme,
6264 threadRef,
@@ -353,6 +355,7 @@ export const MarkdownFileLink = memo(function MarkdownFileLink({
353355 path = { iconPath }
354356 environmentId = { environmentId }
355357 label = { label }
358+ wrapLabel = { wrapLabel }
356359 theme = { theme }
357360 />
358361 </ ContextChip >
@@ -372,6 +375,7 @@ export const MarkdownFileLink = memo(function MarkdownFileLink({
372375 path = { iconPath }
373376 environmentId = { environmentId }
374377 label = { label }
378+ wrapLabel = { wrapLabel }
375379 theme = { theme }
376380 />
377381 </ ContextChip >
@@ -400,6 +404,7 @@ function areMarkdownFileLinkPropsEqual(
400404 previous . panelPath === next . panelPath &&
401405 previous . line === next . line &&
402406 previous . label === next . label &&
407+ previous . wrapLabel === next . wrapLabel &&
403408 previous . copyMarkdown === next . copyMarkdown &&
404409 previous . theme === next . theme &&
405410 previous . threadRef === next . threadRef &&
You can’t perform that action at this time.
0 commit comments