refactor: consolidate duplicate AgentConfig interface

Moved the AgentConfig interface definition from SettingsModal.tsx and
NewInstanceModal.tsx to the shared types file (src/renderer/types/index.ts)
to eliminate code duplication and establish a single source of truth.

Changes:
- Added AgentConfig interface to src/renderer/types/index.ts
- Updated SettingsModal.tsx to import AgentConfig from shared types
- Updated NewInstanceModal.tsx to import AgentConfig from shared types

Resolves housekeeping task #6
This commit is contained in:
Pedram Amini
2025-11-23 21:03:43 -06:00
parent 46859165b2
commit d76176a153
3 changed files with 9 additions and 14 deletions

View File

@@ -1,12 +1,6 @@
import React, { useState, useEffect } from 'react';
import { Folder, X } from 'lucide-react';
interface AgentConfig {
id: string;
name: string;
available: boolean;
path?: string;
}
import type { AgentConfig } from '../types';
interface NewInstanceModalProps {
isOpen: boolean;

View File

@@ -1,12 +1,6 @@
import React, { useState, useEffect, useMemo } from 'react';
import { X, Key, Moon, Sun, Keyboard, Check } from 'lucide-react';
interface AgentConfig {
id: string;
name: string;
available: boolean;
path?: string;
}
import type { AgentConfig } from '../types';
interface SettingsModalProps {
isOpen: boolean;

View File

@@ -102,3 +102,10 @@ export interface Group {
emoji: string;
collapsed: boolean;
}
export interface AgentConfig {
id: string;
name: string;
available: boolean;
path?: string;
}