| name | explain-diff-html |
|---|---|
| description | Use when the user asks for a rich explanation of a code change, diff, branch, or PR. Produces HTML output. |
Please make me a rich, interactive explanation of the specified code change.
It should have these sections:
| import { | |
| Command, | |
| CommandEmpty, | |
| CommandGroup, | |
| CommandItem, | |
| CommandList, | |
| } from '@/components/ui/command' | |
| import { Popover, PopoverContent, PopoverTrigger } from '@/components/ui/popover' | |
| import { useControlledState } from '@/hooks/use-controlled-state' | |
| import { useIsomorphicLayoutEffect } from '@/hooks/use-isomorphic-layout-effect' |
| // Run this command to generate base config and vs code settings: | |
| // pnpm dlx @antfu/eslint-config@latest | |
| import antfu from "@antfu/eslint-config"; | |
| export default antfu({ | |
| type: "app", | |
| typescript: true, | |
| formatters: true, | |
| stylistic: { |
| /* eslint-disable node/no-process-env */ | |
| import type { ZodObject, ZodRawShape } from "zod"; | |
| import { ZodError } from "zod"; | |
| export default function tryParseEnv<T extends ZodRawShape>( | |
| EnvSchema: ZodObject<T>, | |
| buildEnv: Record<string, string | undefined> = process.env, | |
| ) { | |
| try { |
| const path = require('path'); | |
| const SOURCE = 'src'; | |
| const SOURCE_PATH = path.resolve(SOURCE) + '/'; | |
| const removeSourceDirName = path => | |
| path.replace(new RegExp(`^${SOURCE}\/?`, 'gi'), ''); | |
| import * as React from "react"; | |
| type ThemeConfig = "system" | "light" | "dark"; | |
| type ThemeName = "light" | "dark"; | |
| // Custom themes are keyed by a unique id. | |
| type KeyedThemes = { | |
| [k: string]: { | |
| config: ThemeConfig; | |
| themeName: ThemeName; | |
| }; |
| import * as React from "react"; | |
| type Theme = "system" | "light" | "dark"; | |
| const STORAGE_KEY = "theme"; | |
| const VALID_THEMES: Theme[] = ["system", "light", "dark"]; | |
| const DARK_MODE_MEDIA_QUERY = "(prefers-color-scheme: dark)"; | |
| function getAppTheme(): Theme { | |
| if (typeof window !== "undefined") { |
| { | |
| "name": "workshop-computer-validator", | |
| "version": "1.0.0", | |
| "description": "I use this to validate people's computers have the proper versions of node and npm installed for a workshop", | |
| "bin": "./validate-system.js", | |
| "dependencies": { | |
| "semver": "7.1.3" | |
| } | |
| } |
| import React, { Suspense, useState } from "react"; | |
| import { unstable_createResource as createResource } from "react-cache"; | |
| import { | |
| Combobox, | |
| ComboboxInput, | |
| ComboboxList, | |
| ComboboxOption | |
| } from "./Combobox2.js"; | |
| function App({ tabIndex, navigate }) { |