feat(core): improve subagent result display (#20378)

This commit is contained in:
joshualitt
2026-03-09 12:20:15 -07:00
committed by GitHub
parent d246315cea
commit a17691f0fc
21 changed files with 925 additions and 238 deletions
@@ -13,6 +13,7 @@ import {
KeychainSchema,
KEYCHAIN_TEST_PREFIX,
} from './keychainTypes.js';
import { isRecord } from '../utils/markdownUtils.js';
/**
* Service for interacting with OS-level secure storage (e.g. keytar).
@@ -111,7 +112,7 @@ export class KeychainService {
private async loadKeychainModule(): Promise<Keychain | null> {
const moduleName = 'keytar';
const module: unknown = await import(moduleName);
const potential = (this.isRecord(module) && module['default']) || module;
const potential = (isRecord(module) && module['default']) || module;
const result = KeychainSchema.safeParse(potential);
if (result.success) {
@@ -126,10 +127,6 @@ export class KeychainService {
return null;
}
private isRecord(obj: unknown): obj is Record<string, unknown> {
return typeof obj === 'object' && obj !== null;
}
// Performs a set-get-delete cycle to verify keychain functionality.
private async isKeychainFunctional(keychain: Keychain): Promise<boolean> {
const testAccount = `${KEYCHAIN_TEST_PREFIX}${crypto.randomBytes(8).toString('hex')}`;