mirror of
https://github.com/jlengrand/Maestro.git
synced 2026-03-10 08:31:19 +00:00
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:
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -102,3 +102,10 @@ export interface Group {
|
||||
emoji: string;
|
||||
collapsed: boolean;
|
||||
}
|
||||
|
||||
export interface AgentConfig {
|
||||
id: string;
|
||||
name: string;
|
||||
available: boolean;
|
||||
path?: string;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user