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' };
case 'agentConfig': {
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 (
!isRecord(props) ||
typeof props['name'] !== 'string' ||
// eslint-disable-next-line no-restricted-syntax
typeof props['displayName'] !== 'string' ||
!props['definition']
) { throw new Error(
typeof name !== 'string' ||
typeof displayName !== 'string' ||
!definition
) {
throw new Error(
'Received invalid properties for agentConfig dialog action.',
);
}
actions.openAgentConfigDialog(
props['name'],
props['displayName'],
name,
displayName,
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
props['definition'] as AgentDefinition,
definition as AgentDefinition,
);
return { type: 'handled' };
}
@@ -68,8 +68,8 @@ export function useHistory({
isResuming: boolean = false,
): number => {
const id = getNextMessageId(baseTimestamp);
// eslint-disable-next-line @typescript-eslint/no-unsafe-type-assertion
const newItem: HistoryItem = { ...itemData, id } as HistoryItem;
const newItem: HistoryItem = { ...itemData, id };
setHistory((prevHistory) => {
if (prevHistory.length > 0) {