This file contains 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 { useAuth } from "@clerk/clerk-expo"; | |
import { useEffect, useRef, useCallback } from "react"; | |
import EventSource from "react-native-sse"; | |
import { useBaseChat } from "@qms/shared"; | |
import type { | |
UseChatOptions, | |
UseChatReturn, | |
TextDeltaEvent, | |
ToolCallEvent, | |
ToolResultEvent, |
This file contains 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
Understand the Task: Grasp the main objective, goals, requirements, constraints, and expected output. | |
- Minimal Changes: If an existing prompt is provided, improve it only if it's simple. For complex prompts, enhance clarity and add missing elements without altering the original structure. | |
- Reasoning Before Conclusions: Encourage reasoning steps before any conclusions are reached. ATTENTION! If the user provides examples where the reasoning happens afterward, REVERSE the order! NEVER START EXAMPLES WITH CONCLUSIONS! | |
- Reasoning Order: Call out reasoning portions of the prompt and conclusion parts (specific fields by name). For each, determine the ORDER in which this is done, and whether it needs to be reversed. | |
- Conclusion, classifications, or results should ALWAYS appear last. | |
- Examples: Include high-quality examples if helpful, using placeholders [in brackets] for complex elements. | |
- What kinds of examples may need to be included, how many, and whether they are complex enough to benefit from p |
This file contains 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
// Used in https://jina.ai/tokenizer (Aug. 14th version) | |
// Define variables for magic numbers | |
const MAX_HEADING_LENGTH = 6; | |
const MAX_HEADING_CONTENT_LENGTH = 200; | |
const MAX_HEADING_UNDERLINE_LENGTH = 200; | |
const MAX_HTML_HEADING_ATTRIBUTES_LENGTH = 100; | |
const MAX_LIST_ITEM_LENGTH = 200; | |
const MAX_NESTED_LIST_ITEMS = 5; | |
const MAX_LIST_INDENT_SPACES = 7; | |
const MAX_BLOCKQUOTE_LINE_LENGTH = 200; |
This file contains 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
https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts https://mirror1.malwaredomains.com/files/justdomains http://sysctl.org/cameleon/hosts https://zeustracker.abuse.ch/blocklist.php?download=domainblocklist https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt https://hosts-file.net/ad_servers.txt https://v.firebog.net/hosts/AdguardDNS.txt https://adaway.org/hosts.txt https://v.firebog.net/hosts/Easyprivacy.txt https://v.firebog.net/hosts/Prigent-Ads.txt https://zerodot1.gitlab.io/CoinBlockerLists/hosts https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt https://raw.githubusercontent.com/ScottHelme/revocation-endpoints/master/ocsp.txt https://raw.githubusercontent.com/ScottHelme/revocation-endpoints/master/crl.txt https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews/hosts https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/gambling/hosts https://www.malwaredomainlist.c |
This file contains 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
// Modify your settings.json to add these. Customize further how you prefer. | |
{ | |
"workbench.editor.highlightModifiedTabs": true, | |
"workbench.editor.tabCloseButton": "off", | |
"workbench.colorCustomizations": { | |
"editor.lineHighlightBackground": "#ffffff06", | |
"editor.foreground": "#acb3db", | |
"selection.background": "#89DDFF", | |
"progressBar.background": "#89DDFF", | |
"textLink.foreground": "#89DDFF", |
This file contains 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 React, { useState, useEffect, useContext } from "react"; | |
import { Checkout } from "shopify-storefront-api-typings"; | |
import Client from "shopify-buy"; | |
const SHOPIFY_CHECKOUT_STORAGE_KEY = "shopify_checkout_id"; | |
const storefrontAccessToken = process.env.GASTBY_SHOPIFY_ACCESS_TOKEN as string; | |
const client = Client.buildClient({ | |
storefrontAccessToken, |
This file contains 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
const sanityClient = require('@sanity/client'); | |
const { | |
SANITY_API_TOKEN, | |
SANITY_PROJECT_ID, | |
SANITY_DATASET, | |
} = process.env; | |
const client = sanityClient({ | |
projectId: SANITY_PROJECT_ID, |
This file contains 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 PropTypes from 'prop-types'; | |
type Omit<T, K> = Pick<T, Exclude<keyof T, K>>; | |
type Defined<T> = T extends undefined ? never : T; | |
/** | |
* Get the type that represents the props with the defaultProps included. | |
* | |
* Alternatively, we could have done something like this: |
This file contains 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
// Example useStaticQuery | |
// this is src/components/HeaderLogo.tsx | |
import { graphql, Link, useStaticQuery } from 'gatsby' | |
import React from 'react' | |
import { HeaderLogoQuery } from '../types/__generated__/HeaderLogoQuery' | |
const query = graphql` | |
query HeaderLogoQuery { | |
contentfulCompanyMetadata { |
NewerOlder