- Delete unused or obsolete files when your changes make them irrelevant (refactors, feature removals, etc.), and revert files only when the change is yours or explicitly requested. If a git operation leaves you unsure about other agents' in-flight work, stop and coordinate instead of deleting.
- Before attempting to delete a file to resolve a local type/lint failure, stop and ask the user. Other agents are often editing adjacent files; deleting their work to silence an error is never acceptable without explicit approval.
- NEVER edit
.envor any environment variable files—only the user may change them. - Coordinate with other agents before removing their in-progress edits—don't revert or delete work you didn't author unless everyone agrees.
- Moving/renaming and restoring files is allowed.
- ABSOLUTELY NEVER run destructive git operations (e.g.,
git reset --hard,rm,git checkout/git restoreto an older commit) unless the user gives an explicit, written instruction in this conversation. Treat t
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| POST / HTTP/1.1 | |
| Host: localhost | |
| User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/142.0.0.0 Safari/537.36 | |
| Next-Action: x | |
| Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryx8jO2oVc6SWP3Sad | |
| Content-Length: 459 | |
| ------WebKitFormBoundaryx8jO2oVc6SWP3Sad | |
| Content-Disposition: form-data; name="0" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { useEffect, useState } from "react"; | |
| type UseTextSelectionReturn = { | |
| text: string; | |
| rects: DOMRect[]; | |
| ranges: Range[]; | |
| selection: Selection | null; | |
| }; | |
| const getRangesFromSelection = (selection: Selection): Range[] => { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Suspense } from "react"; | |
| import CurrentTimeClient from "./CurrentTimeClient"; | |
| export default function CurrentTime() { | |
| const locale = "en-GB"; | |
| const dateConfig = { | |
| hour: "numeric", | |
| minute: "numeric", | |
| second: "numeric", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import * as React from 'react'; | |
| const useIsFirstRender = (): boolean => { | |
| const isFirst = React.useRef(true); | |
| if (isFirst.current) { | |
| isFirst.current = false; | |
| return true; | |
| } else { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // A very naive implementation of React's use() hook you can copy and paste into your app today | |
| // to use with solutions such as remix's experimental `defer()` feature. | |
| function use<T>(useable: Promise<T> | T) { | |
| if (typeof useable != "object" || !useable || !("then" in useable)) { | |
| return useable; | |
| } | |
| let promise = useable as Promise<T> & { _data?: T; _error?: unknown }; | |
| if ("_data" in promise) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Docusaurus CSS Variables. | |
| I'm making this since I wanted to customize my Docusaurus site theme, but couldn't find a proper list of all Infima CSS variables | |
| the static site generator uses. Thus, I basically copied the root of my site's CSS (along with other vars I found), and made a list | |
| of them that categorizes the vars. | |
| TABLE OF CONTENTS: |
Charts are from different sources and thus colors are inconsistent, please carefully read the chart's legends.
Like this? Check React vs others https://gist.github.com/tkrotoff/b1caa4c3a185629299ec234d2314e190
https://insights.stackoverflow.com/trends?tags=flutter%2Creact-native
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { continueRender, delayRender, RemotionVideoProps } from 'remotion'; | |
| import { GlslVarType, setUniform } from './glUtils'; | |
| export interface VideoShaderOptions { | |
| variables?: { | |
| type: GlslVarType; | |
| name: string; | |
| }[]; | |
| } |
The package that linked you here is now pure ESM. It cannot be require()'d from CommonJS.
This means you have the following choices:
- Use ESM yourself. (preferred)
Useimport foo from 'foo'instead ofconst foo = require('foo')to import the package. You also need to put"type": "module"in your package.json and more. Follow the below guide. - If the package is used in an async context, you could use
await import(…)from CommonJS instead ofrequire(…). - Stay on the existing version of the package until you can move to ESM.
NewerOlder