-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(page.tsx): add tab navigation to occurrence page for easier acce…
…ss to different occurrence details feat(CounterLabel.tsx): create CounterLabel component to display occurrence count with color coding refactor(NoticesTable.tsx): import CounterLabel from new location and remove unused import statement refactor: rename OccurrenceCounterLabel to CounterLabel for consistency with other components feat: add Backtrace component to display backtrace information in occurrence details feat: add BacktraceLine component to display linked file path in backtrace feat: add Context component to display context information in occurrence details feat: add Environment component to display environment information in occurrence details feat(occurrence): add Params, Session and Toolbox components to display occurrence data and add ToolboxAI component to interact with an AI The Params, Session and Toolbox components were added to display occurrence data in the UI. The ToolboxAI component was added to interact with an AI and display its responses in real-time. The Toolbox component was also added to contain the ToolboxAI component and any other future components that may be added.
- Loading branch information
1 parent
9ca0ca9
commit 69b52e0
Showing
14 changed files
with
214 additions
and
191 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import classNames from '@/lib/classNames'; | ||
import { BacktraceItem } from '@/types/airbroke'; | ||
import { Prisma, occurrence, project } from '@prisma/client'; | ||
import LinkedBacktraceLine from './BacktraceLine'; | ||
|
||
function isBacktraceItem(item: any): item is BacktraceItem { | ||
return item && typeof item.file === 'string' && typeof item.line === 'number' && typeof item.function === 'string'; | ||
} | ||
|
||
export default function Backtrace({ occurrence, project }: { occurrence: occurrence; project: project }) { | ||
return ( | ||
<> | ||
{occurrence.backtrace && typeof occurrence.backtrace === 'object' && Array.isArray(occurrence.backtrace) && ( | ||
<div className="px-4 sm:px-6 lg:px-8"> | ||
{(occurrence.backtrace as Prisma.JsonArray).map( | ||
(trace, index) => | ||
isBacktraceItem(trace) && ( | ||
<div key={index} className="flex flex-row flex-wrap justify-start pb-1 font-mono text-xs"> | ||
<p | ||
className={classNames( | ||
trace.file.includes('PROJECT_ROOT') ? 'font-semibold' : '', | ||
'text-xs text-gray-400' | ||
)} | ||
> | ||
<LinkedBacktraceLine file={trace.file} line={trace.line} project={project} /> | ||
</p> | ||
<p className="mx-1 text-gray-400">:</p> | ||
<p className="text-xs font-semibold text-indigo-400">{trace.line}</p> | ||
<p className="mx-1 text-gray-400">→</p> | ||
<p className="text-xs font-semibold text-red-600">{trace.function}</p> | ||
</div> | ||
) | ||
)} | ||
</div> | ||
)} | ||
</> | ||
); | ||
} |
File renamed without changes.
Oops, something went wrong.