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 { gsap } from 'gsap';
import GooseLogo from '../GooseLogo';
import MarkdownContent from '../MarkdownContent';
import { substituteParameters } from '../../utils/providerUtils';
// Register GSAP plugins
gsap.registerPlugin();
interface RecipeActivitiesProps {
append: (text: string) => void;
activities: string[] | null;
@@ -28,7 +28,6 @@ export default function ChatSettingsSection() {
</CardContent>
</Card>
<Card className="pb-2 rounded-lg">
<CardContent className="px-2">
<DictationSection />
@@ -7,9 +7,9 @@ interface ConversationLimitsDropdownProps {
onMaxTurnsChange: (value: number) => void;
}
export const ConversationLimitsDropdown = ({
maxTurns,
onMaxTurnsChange
export const ConversationLimitsDropdown = ({
maxTurns,
onMaxTurnsChange,
}: ConversationLimitsDropdownProps) => {
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"
>
<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 ${
isExpanded ? 'rotate-180' : 'rotate-0'
}`}
}`}
/>
</button>
<div
<div
className={`overflow-hidden transition-all duration-300 ease-in-out ${
isExpanded
? 'max-h-96 opacity-100 mt-2'
: 'max-h-0 opacity-0 mt-0'
isExpanded ? 'max-h-96 opacity-100 mt-2' : 'max-h-0 opacity-0 mt-0'
}`}
>
<div className="space-y-3 pb-2">
@@ -69,10 +69,7 @@ export const ModeSection = () => {
))}
{/* Conversation Limits Dropdown */}
<ConversationLimitsDropdown
maxTurns={maxTurns}
onMaxTurnsChange={handleMaxTurnsChange}
/>
<ConversationLimitsDropdown maxTurns={maxTurns} onMaxTurnsChange={handleMaxTurnsChange} />
</div>
);
};
@@ -11,12 +11,14 @@ const schedulingEngineOptions: SchedulingEngineOption[] = [
{
key: 'builtin-cron',
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',
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">
{schedulingEngineOptions.map((option) => {
const isChecked = schedulingEngine === option.key;
return (
<div key={option.key} className="group hover:cursor-pointer text-sm">
<div
className={`flex items-center justify-between text-text-default py-2 px-2 ${
isChecked
? 'bg-background-muted'
isChecked
? 'bg-background-muted'
: 'bg-background-default hover:bg-background-muted'
} rounded-lg transition-all`}
onClick={() => handleEngineChange(option.key)}
@@ -2,17 +2,6 @@ import { gsap } from 'gsap';
import SplitType from 'split-type';
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 {
resizeCallback?: () => void;
splitTypeTypes?: ('lines' | 'words' | 'chars')[];
@@ -61,18 +50,10 @@ export class TextSplitter {
resizeObserver.observe(this.textElement);
}
revert() {
return this.splitText.revert();
}
getLines(): HTMLElement[] {
return this.splitText.lines ?? [];
}
getWords(): HTMLElement[] {
return this.splitText.words ?? [];
}
getChars(): HTMLElement[] {
return this.splitText.chars ?? [];
}
+1 -1
View File
@@ -10,4 +10,4 @@ export function snakeToTitleCase(snake: string): string {
.split('_')
.map((word) => word.charAt(0).toUpperCase() + word.slice(1).toLowerCase())
.join(' ');
}
}
+1 -1
View File
@@ -2,7 +2,7 @@
* Utility for detecting interruption keywords in user input
*/
export interface InterruptionKeyword {
interface InterruptionKeyword {
keyword: string;
variations: string[];
priority: 'high' | 'medium' | 'low';