mirror of
https://github.com/hanzoai/code.git
synced 2026-09-30 20:53:35 +00:00
header uri name
This commit is contained in:
@@ -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 /
|
||||
|
||||
Reference in New Issue
Block a user