fix: report indexing errors in webview
Signed-off-by: Fred Bricon <fbricon@gmail.com>
This commit is contained in:
parent
0f7217e26a
commit
6a67514fcf
3 changed files with 3 additions and 14 deletions
12
core/core.ts
12
core/core.ts
|
|
@ -1010,13 +1010,6 @@ export class Core {
|
|||
this.indexingCancellationController.signal,
|
||||
)) {
|
||||
let updateToSend = { ...update };
|
||||
// TODO reconsider this status overwrite?
|
||||
// original goal was to not concern users with edge noncritical errors
|
||||
if (update.status === "failed") {
|
||||
updateToSend.status = "done";
|
||||
updateToSend.desc = "Indexing complete";
|
||||
updateToSend.progress = 1.0;
|
||||
}
|
||||
|
||||
void this.messenger.request("indexProgress", updateToSend);
|
||||
this.codebaseIndexingState = updateToSend;
|
||||
|
|
@ -1045,11 +1038,6 @@ export class Core {
|
|||
files,
|
||||
)) {
|
||||
let updateToSend = { ...update };
|
||||
if (update.status === "failed") {
|
||||
updateToSend.status = "done";
|
||||
updateToSend.desc = "Indexing complete";
|
||||
updateToSend.progress = 1.0;
|
||||
}
|
||||
|
||||
void this.messenger.request("indexProgress", updateToSend);
|
||||
this.codebaseIndexingState = updateToSend;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,8 @@ export interface IndexingProgressBarProps {
|
|||
}
|
||||
|
||||
function IndexingProgressBar({ update }: IndexingProgressBarProps) {
|
||||
const progressPercentage = getProgressPercentage(update.progress);
|
||||
// Show 100% red progress bar if indexing failed
|
||||
const progressPercentage = update.status === "failed" ? 100 : getProgressPercentage(update.progress);
|
||||
|
||||
return (
|
||||
<div className="my-2 h-1.5 w-full rounded-md border border-solid border-gray-400">
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ function IndexingProgressErrorText({ update }: IndexingProgressErrorTextProps) {
|
|||
}
|
||||
|
||||
return (
|
||||
<div className="flex items-center gap-2 italic">
|
||||
<div className="flex items-center gap-2 italic text-red-600">
|
||||
<XCircleIcon className="h-4 w-4" />
|
||||
<span className="leading-relaxed">{update.desc}</span>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue