| description | tools | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Beast Mode 3.1 for ZED |
|
You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.
| description | tools | |||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Beast Mode 3.1 for ZED |
|
You are an agent - please keep going until the user’s query is completely resolved, before ending your turn and yielding back to the user.
| import { addYears } from 'date-fns' | |
| import { NextRequest, NextResponse } from 'next/server' | |
| function middleware(req: NextRequest) { | |
| if (req.nextUrl.pathname.startsWith('/api')) { | |
| return NextResponse.next() | |
| } | |
| if (process.env.VERCEL_ENV !== 'preview') { | |
| return NextResponse.next() |
| export default async function auth(req: NextApiRequest, res: NextApiResponse) { | |
| if (process.env.VERCEL) { | |
| // prefer NEXTAUTH_URL, fallback to x-forwarded-host | |
| req.headers['x-forwarded-host'] = | |
| process.env.NEXTAUTH_URL ?? req.headers['x-forwarded-host'] | |
| } | |
| return await NextAuth(req, res, authOptions()) | |
| } |
| diff --git a/node_modules/next-auth/next/index.js b/node_modules/next-auth/next/index.js | |
| index b17feef..3e56332 100644 | |
| --- a/node_modules/next-auth/next/index.js | |
| +++ b/node_modules/next-auth/next/index.js | |
| @@ -58,11 +58,6 @@ async function NextAuthRouteHandler(req, context, options) { | |
| (_options$secret2 = options.secret) !== null && _options$secret2 !== void 0 ? _options$secret2 : options.secret = process.env.NEXTAUTH_SECRET; | |
| - const { | |
| - headers, |
| axios.defaults.httpsAgent = new https.Agent({ | |
| // for self signed you could also add | |
| // rejectUnauthorized: false, | |
| // allow legacy server | |
| secureOptions: crypto.constants.SSL_OP_LEGACY_SERVER_CONNECT, | |
| }) |
| const s = 'abcergsserswsGiogjadSf48ewfu64896' | |
| const listByKey = Array.from(s).reduce((acc, char) => { | |
| if (!isNaN(char)) return acc | |
| const letter = char.toLowerCase() | |
| const count = acc[letter] ? acc[letter] + 1 : 1 | |
| return { | |
| ...acc, |
| import React, { createContext, useContext, useState, useEffect } from "react"; | |
| const SnackbarContext = createContext(); | |
| const Provider = ({ children }) => { | |
| const [state, setState] = useState([]); | |
| console.log(state); | |
| return ( | |
| <SnackbarContext.Provider value={{ state, setState }}> |
| function base64ToArrayBuffer(base64Str: string) { | |
| const byteCharacters = window.atob(base64Str); | |
| const byteNumbers = new Array(byteCharacters.length); | |
| for (let i = 0; i < byteCharacters.length; i++) { | |
| byteNumbers[i] = byteCharacters.charCodeAt(i); | |
| } | |
| const byteArray = new Uint8Array(byteNumbers); | |
| return byteArray; | |
| } |
| /** | |
| * go to the exercises => http://csbin.io/closures | |
| * | |
| */ | |
| // CHALLENGE 1 | |
| function createFunction() { | |
| function sayHello() { | |
| console.log('hello'); | |
| } |
| function createStore(initialState, reducer) { | |
| let state = initialState; | |
| let callback = []; | |
| return { | |
| listen(cb) { | |
| callback = calback.push(cb); | |
| }, | |
| dispatch(actionCreator) { | |
| const newState = reducer(state, actionCreator); |