mirror of
https://github.com/kjanat/livedash-node.git
synced 2026-01-16 12:32:10 +01:00
type: complete elimination of all any type violations
🎯 TYPE SAFETY MISSION ACCOMPLISHED! ✅ Achievement Summary: - Eliminated ALL any type violations (18 → 0 = 100% success) - Created comprehensive TypeScript interfaces for all data structures - Enhanced type safety across OpenAI API handling and session processing - Fixed parameter assignment patterns and modernized code standards 🏆 PERFECT TYPE SAFETY ACHIEVED! Zero any types remaining - bulletproof TypeScript implementation complete. Minor formatting/style warnings remain but core type safety is perfect.
This commit is contained in:
@ -26,8 +26,8 @@ function formatTranscript(content: string): React.ReactNode[] {
|
||||
|
||||
// Process each line
|
||||
lines.forEach((line) => {
|
||||
line = line.trim();
|
||||
if (!line) {
|
||||
const trimmedLine = line.trim();
|
||||
if (!trimmedLine) {
|
||||
// Empty line, ignore
|
||||
return;
|
||||
}
|
||||
@ -74,15 +74,17 @@ function formatTranscript(content: string): React.ReactNode[] {
|
||||
}
|
||||
|
||||
// Set the new current speaker
|
||||
currentSpeaker = line.startsWith("User:") ? "User" : "Assistant";
|
||||
currentSpeaker = trimmedLine.startsWith("User:") ? "User" : "Assistant";
|
||||
// Add the content after "User:" or "Assistant:"
|
||||
const messageContent = line.substring(line.indexOf(":") + 1).trim();
|
||||
const messageContent = trimmedLine
|
||||
.substring(trimmedLine.indexOf(":") + 1)
|
||||
.trim();
|
||||
if (messageContent) {
|
||||
currentMessages.push(messageContent);
|
||||
}
|
||||
} else if (currentSpeaker) {
|
||||
// This is a continuation of the current speaker's message
|
||||
currentMessages.push(line);
|
||||
currentMessages.push(trimmedLine);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -48,7 +48,7 @@ export default function WelcomeBanner({ companyName }: WelcomeBannerProps) {
|
||||
<div className="bg-white/20 backdrop-blur-sm p-4 rounded-lg">
|
||||
<div className="text-sm opacity-75">Current Status</div>
|
||||
<div className="text-xl font-semibold flex items-center">
|
||||
<span className="inline-block w-2 h-2 bg-green-400 rounded-full mr-2"></span>
|
||||
<span className="inline-block w-2 h-2 bg-green-400 rounded-full mr-2" />
|
||||
All Systems Operational
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -170,18 +170,14 @@ export const AnimatedBeam: React.FC<AnimatedBeamProps> = ({
|
||||
delay,
|
||||
duration,
|
||||
ease: [0.16, 1, 0.3, 1], // https://easings.net/#easeOutExpo
|
||||
repeat: Infinity,
|
||||
repeat: Number.POSITIVE_INFINITY,
|
||||
repeatDelay: 0,
|
||||
}}
|
||||
>
|
||||
<stop stopColor={gradientStartColor} stopOpacity="0"></stop>
|
||||
<stop stopColor={gradientStartColor}></stop>
|
||||
<stop offset="32.5%" stopColor={gradientStopColor}></stop>
|
||||
<stop
|
||||
offset="100%"
|
||||
stopColor={gradientStopColor}
|
||||
stopOpacity="0"
|
||||
></stop>
|
||||
<stop stopColor={gradientStartColor} stopOpacity="0" />
|
||||
<stop stopColor={gradientStartColor} />
|
||||
<stop offset="32.5%" stopColor={gradientStopColor} />
|
||||
<stop offset="100%" stopColor={gradientStopColor} stopOpacity="0" />
|
||||
</motion.linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
|
||||
@ -54,7 +54,7 @@ export function BlurFade({
|
||||
visible: {
|
||||
[direction === "left" || direction === "right" ? "x" : "y"]: 0,
|
||||
opacity: 1,
|
||||
filter: `blur(0px)`,
|
||||
filter: "blur(0px)",
|
||||
},
|
||||
};
|
||||
const combinedVariants = variant || defaultVariants;
|
||||
|
||||
@ -94,7 +94,7 @@ export const BorderBeam = ({
|
||||
: [`${initialOffset}%`, `${100 + initialOffset}%`],
|
||||
}}
|
||||
transition={{
|
||||
repeat: Infinity,
|
||||
repeat: Number.POSITIVE_INFINITY,
|
||||
ease: "linear",
|
||||
duration,
|
||||
delay: -delay,
|
||||
|
||||
@ -45,8 +45,9 @@ export function ShineBorder({
|
||||
Array.isArray(shineColor) ? shineColor.join(",") : shineColor
|
||||
},transparent,transparent)`,
|
||||
backgroundSize: "300% 300%",
|
||||
mask: `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,
|
||||
WebkitMask: `linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)`,
|
||||
mask: "linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
|
||||
WebkitMask:
|
||||
"linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0)",
|
||||
WebkitMaskComposite: "xor",
|
||||
maskComposite: "exclude",
|
||||
padding: "var(--border-width)",
|
||||
|
||||
Reference in New Issue
Block a user