fix: resolve build and linting issues

This commit is contained in:
mkorwel
2026-03-13 18:40:53 +00:00
committed by Matt Korwel
parent 112a4195bd
commit d458dbbfb9
2 changed files with 18 additions and 12 deletions
@@ -503,22 +503,28 @@ export const useSlashCommandProcessor = (
return { type: 'handled' }; return { type: 'handled' };
case 'agentConfig': { case 'agentConfig': {
const props = result.props; const props = result.props;
const name = isRecord(props) ? props['name'] : undefined;
const displayName = isRecord(props)
? props['displayName']
: undefined;
const definition = isRecord(props)
? props['definition']
: undefined;
if ( if (
!isRecord(props) || typeof name !== 'string' ||
typeof props['name'] !== 'string' || typeof displayName !== 'string' ||
// eslint-disable-next-line no-restricted-syntax !definition
typeof props['displayName'] !== 'string' || ) {
!props['definition'] throw new Error(
) { throw new Error(
'Received invalid properties for agentConfig dialog action.', 'Received invalid properties for agentConfig dialog action.',
); );
} }
actions.openAgentConfigDialog( actions.openAgentConfigDialog(
props['name'], name,
props['displayName'], displayName,
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion // eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
props['definition'] as AgentDefinition, definition as AgentDefinition,
); );
return { type: 'handled' }; return { type: 'handled' };
} }
@@ -68,8 +68,8 @@ export function useHistory({
isResuming: boolean = false, isResuming: boolean = false,
): number => { ): number => {
const id = getNextMessageId(baseTimestamp); const id = getNextMessageId(baseTimestamp);
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion const newItem: HistoryItem = { ...itemData, id };
const newItem: HistoryItem = { ...itemData, id } as HistoryItem;
setHistory((prevHistory) => { setHistory((prevHistory) => {
if (prevHistory.length > 0) { if (prevHistory.length > 0) {