Bug fixes for openai provider

This commit is contained in:
Saoud Rizwan
2024-09-03 19:22:52 -04:00
parent 8274e89eac
commit cceebdc04c
6 changed files with 19 additions and 16 deletions

View File

@@ -65,12 +65,13 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
const ExportButton = ({ itemId }: { itemId: string }) => (
<VSCodeButton
className="export-button"
appearance="icon"
onClick={(e) => {
e.stopPropagation()
handleExportMd(itemId)
}}>
<div style={{ fontSize: "11px", fontWeight: 500, opacity: 1 }}>EXPORT .MD</div>
<div style={{ fontSize: "11px", fontWeight: 500, opacity: 1 }}>EXPORT</div>
</VSCodeButton>
)
@@ -81,11 +82,12 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
.history-item:hover {
background-color: var(--vscode-list-hoverBackground);
}
.delete-button {
.delete-button, .export-button {
opacity: 0;
pointer-events: none;
}
.history-item:hover .delete-button {
.history-item:hover .delete-button,
.history-item:hover .export-button {
opacity: 1;
pointer-events: auto;
}
@@ -282,7 +284,7 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
{!item.totalCost && <ExportButton itemId={item.id} />}
</div>
{item.cacheWrites && item.cacheReads && (
{!!item.cacheWrites && (
<div
style={{
display: "flex",
@@ -329,7 +331,7 @@ const HistoryView = ({ onDone }: HistoryViewProps) => {
marginBottom: 0,
}}
/>
{item.cacheReads?.toLocaleString()}
{(item.cacheReads || 0).toLocaleString()}
</span>
</div>
)}