Remove some unused stuff (#4388)

Co-authored-by: Douwe Osinga <douwe@squareup.com>
This commit is contained in:
Douwe Osinga
2025-09-22 15:53:19 -04:00
committed by GitHub
parent 83fc8a69d3
commit c10f335038
8 changed files with 18 additions and 45 deletions
@@ -1,12 +1,8 @@
import { Card } from '../ui/card'; import { Card } from '../ui/card';
import { gsap } from 'gsap';
import GooseLogo from '../GooseLogo'; import GooseLogo from '../GooseLogo';
import MarkdownContent from '../MarkdownContent'; import MarkdownContent from '../MarkdownContent';
import { substituteParameters } from '../../utils/providerUtils'; import { substituteParameters } from '../../utils/providerUtils';
// Register GSAP plugins
gsap.registerPlugin();
interface RecipeActivitiesProps { interface RecipeActivitiesProps {
append: (text: string) => void; append: (text: string) => void;
activities: string[] | null; activities: string[] | null;
@@ -28,7 +28,6 @@ export default function ChatSettingsSection() {
</CardContent> </CardContent>
</Card> </Card>
<Card className="pb-2 rounded-lg"> <Card className="pb-2 rounded-lg">
<CardContent className="px-2"> <CardContent className="px-2">
<DictationSection /> <DictationSection />
@@ -7,9 +7,9 @@ interface ConversationLimitsDropdownProps {
onMaxTurnsChange: (value: number) => void; onMaxTurnsChange: (value: number) => void;
} }
export const ConversationLimitsDropdown = ({ export const ConversationLimitsDropdown = ({
maxTurns, maxTurns,
onMaxTurnsChange onMaxTurnsChange,
}: ConversationLimitsDropdownProps) => { }: ConversationLimitsDropdownProps) => {
const [isExpanded, setIsExpanded] = useState(false); const [isExpanded, setIsExpanded] = useState(false);
@@ -24,19 +24,17 @@ export const ConversationLimitsDropdown = ({
className="w-full flex items-center justify-between py-2 px-2 hover:bg-background-muted rounded-lg transition-all group" className="w-full flex items-center justify-between py-2 px-2 hover:bg-background-muted rounded-lg transition-all group"
> >
<h3 className="text-text-default font-medium">Conversation Limits</h3> <h3 className="text-text-default font-medium">Conversation Limits</h3>
<ChevronDown <ChevronDown
className={`w-4 h-4 text-text-muted transition-transform duration-200 ease-in-out ${ className={`w-4 h-4 text-text-muted transition-transform duration-200 ease-in-out ${
isExpanded ? 'rotate-180' : 'rotate-0' isExpanded ? 'rotate-180' : 'rotate-0'
}`} }`}
/> />
</button> </button>
<div <div
className={`overflow-hidden transition-all duration-300 ease-in-out ${ className={`overflow-hidden transition-all duration-300 ease-in-out ${
isExpanded isExpanded ? 'max-h-96 opacity-100 mt-2' : 'max-h-0 opacity-0 mt-0'
? 'max-h-96 opacity-100 mt-2'
: 'max-h-0 opacity-0 mt-0'
}`} }`}
> >
<div className="space-y-3 pb-2"> <div className="space-y-3 pb-2">
@@ -69,10 +69,7 @@ export const ModeSection = () => {
))} ))}
{/* Conversation Limits Dropdown */} {/* Conversation Limits Dropdown */}
<ConversationLimitsDropdown <ConversationLimitsDropdown maxTurns={maxTurns} onMaxTurnsChange={handleMaxTurnsChange} />
maxTurns={maxTurns}
onMaxTurnsChange={handleMaxTurnsChange}
/>
</div> </div>
); );
}; };
@@ -11,12 +11,14 @@ const schedulingEngineOptions: SchedulingEngineOption[] = [
{ {
key: 'builtin-cron', key: 'builtin-cron',
label: 'Built-in Cron (Default)', label: 'Built-in Cron (Default)',
description: 'Uses Goose\'s built-in cron scheduler. Simple and reliable for basic scheduling needs.', description:
"Uses Goose's built-in cron scheduler. Simple and reliable for basic scheduling needs.",
}, },
{ {
key: 'temporal', key: 'temporal',
label: 'Temporal', label: 'Temporal',
description: 'Uses Temporal workflow engine for advanced scheduling features. Requires Temporal CLI to be installed.', description:
'Uses Temporal workflow engine for advanced scheduling features. Requires Temporal CLI to be installed.',
}, },
]; ];
@@ -60,13 +62,13 @@ export default function SchedulerSection({ onSchedulingEngineChange }: Scheduler
<div className="space-y-1"> <div className="space-y-1">
{schedulingEngineOptions.map((option) => { {schedulingEngineOptions.map((option) => {
const isChecked = schedulingEngine === option.key; const isChecked = schedulingEngine === option.key;
return ( return (
<div key={option.key} className="group hover:cursor-pointer text-sm"> <div key={option.key} className="group hover:cursor-pointer text-sm">
<div <div
className={`flex items-center justify-between text-text-default py-2 px-2 ${ className={`flex items-center justify-between text-text-default py-2 px-2 ${
isChecked isChecked
? 'bg-background-muted' ? 'bg-background-muted'
: 'bg-background-default hover:bg-background-muted' : 'bg-background-default hover:bg-background-muted'
} rounded-lg transition-all`} } rounded-lg transition-all`}
onClick={() => handleEngineChange(option.key)} onClick={() => handleEngineChange(option.key)}
@@ -2,17 +2,6 @@ import { gsap } from 'gsap';
import SplitType from 'split-type'; import SplitType from 'split-type';
import { useEffect, useRef } from 'react'; import { useEffect, useRef } from 'react';
// Utility debounce function
export const debounce = <T extends (...args: unknown[]) => void>(func: T, delay: number): T => {
let timerId: ReturnType<typeof setTimeout>;
return ((...args: unknown[]) => {
window.clearTimeout(timerId);
timerId = setTimeout(() => {
func(...args);
}, delay);
}) as T;
};
interface TextSplitterOptions { interface TextSplitterOptions {
resizeCallback?: () => void; resizeCallback?: () => void;
splitTypeTypes?: ('lines' | 'words' | 'chars')[]; splitTypeTypes?: ('lines' | 'words' | 'chars')[];
@@ -61,18 +50,10 @@ export class TextSplitter {
resizeObserver.observe(this.textElement); resizeObserver.observe(this.textElement);
} }
revert() {
return this.splitText.revert();
}
getLines(): HTMLElement[] { getLines(): HTMLElement[] {
return this.splitText.lines ?? []; return this.splitText.lines ?? [];
} }
getWords(): HTMLElement[] {
return this.splitText.words ?? [];
}
getChars(): HTMLElement[] { getChars(): HTMLElement[] {
return this.splitText.chars ?? []; return this.splitText.chars ?? [];
} }
+1 -1
View File
@@ -10,4 +10,4 @@ export function snakeToTitleCase(snake: string): string {
.split('_') .split('_')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()) .map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
.join(' '); .join(' ');
} }
+1 -1
View File
@@ -2,7 +2,7 @@
* Utility for detecting interruption keywords in user input * Utility for detecting interruption keywords in user input
*/ */
export interface InterruptionKeyword { interface InterruptionKeyword {
keyword: string; keyword: string;
variations: string[]; variations: string[];
priority: 'high' | 'medium' | 'low'; priority: 'high' | 'medium' | 'low';