ignore e.stack

This commit is contained in:
Andrew Pareles 2024-11-26 02:22:05 -08:00
parent 8ff4f1c6e1
commit 9f27b17f11
2 changed files with 3 additions and 3 deletions

View file

@ -15,7 +15,7 @@ import { getCmdKey } from '../../../getCmdKey.js';
type Details = {
message: string,
name: string,
// stack: string | null,
stack: string | null,
cause: string | null,
code: string | null,
additional: Record<string, any>
@ -48,7 +48,7 @@ const getErrorDetails = (error: unknown) => {
details = {
name: e.name || 'Error',
message: message,
// stack: e.stack || null, // can we remove this? it looks awful and not sure stack is ever useful
stack: null, // e.stack is ignored because it's ugly and not very useful
cause: e.cause ? String(e.cause) : null,
code: e.code || null,
additional: {}

View file

@ -147,7 +147,7 @@ registerAction2(class extends Action2 {
}
async run(accessor: ServicesAccessor): Promise<void> {
const stateService = accessor.get(IVoidSidebarStateService)
stateService.setState({ isHistoryOpen: false, currentTab: 'settings' })
stateService.setState({ isHistoryOpen: false, currentTab: stateService.state.currentTab === 'settings' ? 'chat' : 'settings' })
stateService.fireBlurChat()
}
})