mirror of
https://github.com/voideditor/void
synced 2026-05-24 09:58:23 +00:00
header uri name
This commit is contained in:
parent
7ea5870a11
commit
c1e83e458b
2 changed files with 3 additions and 3 deletions
|
|
@ -5,7 +5,7 @@ import { isFeatureNameDisabled } from '../../../../common/voidSettingsTypes.js'
|
|||
import { URI } from '../../../../../../../base/common/uri.js'
|
||||
import { LucideIcon, RotateCw } from 'lucide-react'
|
||||
import { Check, X, Square, Copy, Play, } from 'lucide-react'
|
||||
import { ToolContentsWrapper } from '../sidebar-tsx/SidebarChat.js'
|
||||
import { getBasename, ToolContentsWrapper } from '../sidebar-tsx/SidebarChat.js'
|
||||
import { ChatMarkdownRender } from './ChatMarkdownRender.js'
|
||||
|
||||
enum CopyButtonText {
|
||||
|
|
@ -288,7 +288,7 @@ export const BlockCodeApplyWrapper = ({
|
|||
<div className="flex items-center">
|
||||
{statusIndicatorHTML}
|
||||
<span className="text-[13px] font-light text-void-fg-3">
|
||||
{language || 'text'}
|
||||
{uri !== 'current' ? getBasename(uri.fsPath) : language || 'text'}
|
||||
</span>
|
||||
</div>
|
||||
<div className={`${canApply ? '' : 'hidden'} flex items-center gap-1`}>
|
||||
|
|
|
|||
|
|
@ -491,7 +491,7 @@ const ScrollToBottomContainer = ({ children, className, style, scrollContainerRe
|
|||
};
|
||||
|
||||
|
||||
const getBasename = (pathStr: string) => {
|
||||
export const getBasename = (pathStr: string) => {
|
||||
// 'unixify' path
|
||||
pathStr = pathStr.replace(/[/\\]+/g, '/') // replace any / or \ or \\ with /
|
||||
const parts = pathStr.split('/') // split on /
|
||||
|
|
|
|||
Loading…
Reference in a new issue