Remove commented-out code and update configurations

Deleted unused or commented-out code across multiple files to improve clarity and maintainability. Updated `kv_namespaces` in `wrangler.toml` and specified the package manager in `package.json`. Add placeholder values for development kv stores.
This commit is contained in:
geoffsee
2025-05-23 14:36:35 -04:00
parent d7a346891f
commit fe51876e89
13 changed files with 14 additions and 80 deletions

View File

@@ -102,5 +102,6 @@
"vite": "^5.4.11", "vite": "^5.4.11",
"wrangler": "^4.14.4", "wrangler": "^4.14.4",
"zod": "^3.23.8" "zod": "^3.23.8"
} },
"packageManager": "pnpm@10.7.1+sha512.2d92c86b7928dc8284f53494fb4201f983da65f0fb4f0d40baafa5cf628fa31dae3e5968f12466f17df7e97310e30f343a648baea1b9b350685dafafffdf5808"
} }

View File

@@ -1,4 +1,4 @@
import React, { useEffect } from "react"; import React from "react";
import {Box, Grid, GridItem} from "@chakra-ui/react"; import {Box, Grid, GridItem} from "@chakra-ui/react";
import MessageBubble from "./MessageBubble"; import MessageBubble from "./MessageBubble";
import {observer} from "mobx-react-lite"; import {observer} from "mobx-react-lite";
@@ -12,12 +12,6 @@ interface ChatMessagesProps {
const ChatMessages: React.FC<ChatMessagesProps> = observer(({ scrollRef }) => { const ChatMessages: React.FC<ChatMessagesProps> = observer(({ scrollRef }) => {
const isMobile = useIsMobile(); const isMobile = useIsMobile();
useEffect(() => {
(async () => {
await import("./math.css");
})();
}, []);
return ( return (
<Box <Box
pt={isMobile ? 24 : undefined} pt={isMobile ? 24 : undefined}

View File

@@ -175,7 +175,6 @@ const CustomKatex: React.FC<{ math: string; displayMode: boolean }> = ({
<Box <Box
as="span" as="span"
display={displayMode ? "block" : "inline"} display={displayMode ? "block" : "inline"}
// bg={bg}
p={displayMode ? 4 : 1} p={displayMode ? 4 : 1}
my={displayMode ? 4 : 0} my={displayMode ? 4 : 0}
borderRadius="md" borderRadius="md"

View File

@@ -1,48 +1,16 @@
const SUPPORTED_MODELS_GROUPS = { const SUPPORTED_MODELS_GROUPS = {
openai: [ openai: [],
// "o1-preview",
// "o1-mini",
// "gpt-4o",
// "gpt-3.5-turbo"
],
groq: [ groq: [
// "mixtral-8x7b-32768",
// "deepseek-r1-distill-llama-70b",
"meta-llama/llama-4-scout-17b-16e-instruct", "meta-llama/llama-4-scout-17b-16e-instruct",
"gemma2-9b-it", "gemma2-9b-it",
"mistral-saba-24b", "mistral-saba-24b",
// "qwen-2.5-32b",
"llama-3.3-70b-versatile", "llama-3.3-70b-versatile",
// "llama-3.3-70b-versatile"
// "llama-3.1-70b-versatile",
// "llama-3.3-70b-versatile"
], ],
cerebras: ["llama-3.3-70b"], cerebras: ["llama-3.3-70b"],
claude: [ claude: [],
// "claude-3-5-sonnet-20241022", fireworks: [],
// "claude-3-opus-20240229" google: [],
], xai: [],
fireworks: [
// "llama-v3p1-405b-instruct",
// "llama-v3p1-70b-instruct",
// "llama-v3p2-90b-vision-instruct",
// "mixtral-8x22b-instruct",
// "mythomax-l2-13b",
// "yi-large"
],
google: [
// "gemini-2.0-flash-exp",
// "gemini-1.5-flash",
// "gemini-exp-1206",
// "gemini-1.5-pro"
],
xai: [
// "grok-beta",
// "grok-2",
// "grok-2-1212",
// "grok-2-latest",
// "grok-beta"
],
cloudflareAI: [ cloudflareAI: [
"llama-3.2-3b-instruct", // max_tokens "llama-3.2-3b-instruct", // max_tokens
"llama-3-8b-instruct", // max_tokens "llama-3-8b-instruct", // max_tokens
@@ -54,7 +22,6 @@ const SUPPORTED_MODELS_GROUPS = {
"mistral-7b-instruct-v0.2", "mistral-7b-instruct-v0.2",
"neural-chat-7b-v3-1-awq", "neural-chat-7b-v3-1-awq",
"openchat-3.5-0106", "openchat-3.5-0106",
// "gemma-7b-it",
], ],
}; };
@@ -75,12 +42,8 @@ function getModelFamily(model: string): ModelFamily | undefined {
} }
const SUPPORTED_MODELS = [ const SUPPORTED_MODELS = [
// ...SUPPORTED_MODELS_GROUPS.xai,
// ...SUPPORTED_MODELS_GROUPS.claude,
// ...SUPPORTED_MODELS_GROUPS.google,
...SUPPORTED_MODELS_GROUPS.groq, ...SUPPORTED_MODELS_GROUPS.groq,
...SUPPORTED_MODELS_GROUPS.fireworks, ...SUPPORTED_MODELS_GROUPS.fireworks,
// ...SUPPORTED_MODELS_GROUPS.openai,
...SUPPORTED_MODELS_GROUPS.cerebras, ...SUPPORTED_MODELS_GROUPS.cerebras,
...SUPPORTED_MODELS_GROUPS.cloudflareAI, ...SUPPORTED_MODELS_GROUPS.cloudflareAI,
]; ];

View File

@@ -89,7 +89,6 @@ function ConnectComponent() {
onChange={(e) => handleChange("lastname")(e.target.value)} onChange={(e) => handleChange("lastname")(e.target.value)}
color="text.primary" color="text.primary"
borderColor="text.primary" borderColor="text.primary"
// bg="text.primary"
/> />
</HStack> </HStack>
<Input <Input
@@ -108,7 +107,6 @@ function ConnectComponent() {
</Box> </Box>
<Button <Button
variant="outline" variant="outline"
// colorScheme="blackAlpha"
onClick={handleSubmitButton} onClick={handleSubmitButton}
alignSelf="flex-end" alignSelf="flex-end"
size="md" size="md"

View File

@@ -7,7 +7,7 @@ export const MarkdownEditor = (props: {
onChange: (p: any) => any; onChange: (p: any) => any;
}) => { }) => {
return ( return (
<Box sx={styles}> <Box>
<link rel="stylesheet" href="/" media="print" onLoad="this.media='all'" /> <link rel="stylesheet" href="/" media="print" onLoad="this.media='all'" />
<Textarea <Textarea
value={props.markdown} value={props.markdown}

View File

@@ -42,10 +42,7 @@ export const webComponents = {
), ),
ul: ({ children }) => ( ul: ({ children }) => (
<UnorderedList <UnorderedList
// pl={3}
// mb={2}
fontSize="sm" fontSize="sm"
// stylePosition="inside" // Keep bullets inside the text flow
> >
{children} {children}
</UnorderedList> </UnorderedList>
@@ -59,12 +56,7 @@ export const webComponents = {
li: ({ children, ...rest }) => { li: ({ children, ...rest }) => {
const filteredChildren = React.Children.toArray(children) const filteredChildren = React.Children.toArray(children)
.filter((child) => !(typeof child === "string" && child.trim() === "\n")) .filter((child) => !(typeof child === "string" && child.trim() === "\n"))
.map((child, index, array) => { .map((child) => child);
// if (typeof child === 'string' && index === array.length - 1 && /\n/.test(child)) {
// return '\n';
// }
return child;
});
return <ListItem {...rest}>{filteredChildren}</ListItem>; return <ListItem {...rest}>{filteredChildren}</ListItem>;
}, },

View File

@@ -8,7 +8,6 @@ function NavItem({ path, children, color, onClick, as, cursor }) {
href={path} href={path}
mb={2} mb={2}
cursor={cursor} cursor={cursor}
// ml={5}
mr={2} mr={2}
color={color ?? "text.accent"} color={color ?? "text.accent"}
letterSpacing="normal" letterSpacing="normal"

View File

@@ -118,7 +118,6 @@ const components = {
bg: "background.primary", bg: "background.primary",
color: "text.primary", color: "text.primary",
boxShadow: "md", boxShadow: "md",
// p: 4,
".mdxeditor-toolbar": { ".mdxeditor-toolbar": {
border: "1px solid", border: "1px solid",
@@ -127,8 +126,6 @@ const components = {
bg: "background.primary", bg: "background.primary",
m: 2, m: 2,
p: 2, p: 2,
// mb: 3,
// p: 3,
"& button": { "& button": {
border: "none", border: "none",
@@ -153,7 +150,6 @@ const components = {
boxShadow: "0 0 0 2px var(--text-primary)", boxShadow: "0 0 0 2px var(--text-primary)",
transform: "translateY(-1px)", transform: "translateY(-1px)",
transition: "all 0.2s ease", transition: "all 0.2s ease",
// border: '2px solid transparent', // No border needed for SVG
}, },
'&[data-state="off"]': { '&[data-state="off"]': {
bg: "transparent", bg: "transparent",
@@ -173,7 +169,6 @@ const components = {
CodeBlocks: { CodeBlocks: {
baseStyle: (props) => ({ baseStyle: (props) => ({
bg: "background.primary", bg: "background.primary",
// color: 'text.primary',
}), }),
}, },
}; };

View File

@@ -1,9 +1,5 @@
export default { export default {
"/": { sidebarLabel: "Home", heroLabel: "g.s" }, "/": { sidebarLabel: "Home", heroLabel: "g.s" },
// "/about": { sidebarLabel: "About", heroLabel: "About Me" },
// "/resume": { sidebarLabel: "Resume", heroLabel: "resume" },
// "/demo": { sidebarLabel: "Demo", heroLabel: "Demos" },
// "/services": { sidebarLabel: "Services", heroLabel: "services" },
"/connect": { sidebarLabel: "Connect", heroLabel: "connect" }, "/connect": { sidebarLabel: "Connect", heroLabel: "connect" },
"/privacy-policy": { "/privacy-policy": {
sidebarLabel: "", sidebarLabel: "",

View File

@@ -17,7 +17,6 @@ export default class EmailWorker extends WorkerEntrypoint {
addr: "contact@seemueller.io", addr: "contact@seemueller.io",
}); });
console.log("Recipient:", to); console.log("Recipient:", to);
// msg.setRecipient(to);
msg.setRecipient(to); msg.setRecipient(to);
msg.setSubject("New Contact Request: Website"); msg.setSubject("New Contact Request: Website");
msg.addMessage({ msg.addMessage({

View File

@@ -27,8 +27,6 @@ export class AssistantSdk {
tools tools
.map((tool) => { .map((tool) => {
switch (tool) { switch (tool) {
// case "user-attachments": return "### Attachments\nUser supplied attachments are normalized to text and will have this header (# Attachment:...) in the message.";
// case "web-search": return "### Web Search\nResults are optionally available in 'Live Search'.";
default: default:
return `- ${tool}`; return `- ${tool}`;
} }

View File

@@ -13,7 +13,7 @@ preview_urls = false
# Dev configuration (local) # Dev configuration (local)
durable_objects.bindings = [{name = "SITE_COORDINATOR", class_name = "SiteCoordinator", script_name = "geoff-seemueller-io"}] durable_objects.bindings = [{name = "SITE_COORDINATOR", class_name = "SiteCoordinator", script_name = "geoff-seemueller-io"}]
migrations = [{tag = "v1", new_classes = ["SiteCoordinator"]}] migrations = [{tag = "v1", new_classes = ["SiteCoordinator"]}]
kv_namespaces = [{binding = "KV_STORAGE", id = "", preview_id = ""}] kv_namespaces = [{binding = "KV_STORAGE", id = "placeholderId", preview_id = "placeholderIdPreview"}]
services = [{binding = "EMAIL_SERVICE", service = "email-service-rpc"}] services = [{binding = "EMAIL_SERVICE", service = "email-service-rpc"}]
# Dev configuration (remote) # Dev configuration (remote)