Skip to content

Instantly share code, notes, and snippets.

import { FileState, GoogleAIFileManager } from "@google/generative-ai/server";
import { google } from "@ai-sdk/google";
import { generateText } from "ai";
import "dotenv/config";
async function main() {
const fileManager = new GoogleAIFileManager(
process.env.GOOGLE_GENERATIVE_AI_API_KEY!
);
'use client';
!function(e){"use strict";var t=Object.create,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,s=(e,t)=>function(){return t||(0,e[o(e)[0]])((t={exports:{}}).exports,t),t.exports},l=s({"../../node_modules/.pnpm/[email protected]/node_modules/react/cjs/react.production.min.js"(e){var t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),s=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),u=Symbol.for("react.lazy"),p=Symbol.iterator;var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},f=Object.assign,m={};function g(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||h}function v(){}function w(e,t,n){this.props=e,this.con
interface StackInfo {
fullStack: string[];
topFrame: string;
sourceFile: string;
}
const getDescriptor = (obj: any, prop: string) => {
let desc;
while (obj && !desc) {
desc = Object.getOwnPropertyDescriptor(obj, prop);
@RobPruzan
RobPruzan / again.js
Last active February 24, 2025 17:31
(function (exports) {
'use strict';
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
/**
* Copyright 2024 Aiden Bai, Million Software, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the “Software”), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
(function (exports) {
'use strict';
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
/**
* Copyright 2024 Aiden Bai, Million Software, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the “Software”), to deal in the Software without restriction,
* including without limitation the rights to use, copy, modify, merge, publish, distribute,
'use client';
(function (exports) {
'use strict';
var _documentCurrentScript = typeof document !== 'undefined' ? document.currentScript : null;
/**
* Copyright 2024 Aiden Bai, Million Software, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software
* and associated documentation files (the “Software”), to deal in the Software without restriction,
'use client';
!function(e){"use strict";var t="undefined"!=typeof document?document.currentScript:null,n="bippy-0.2.7",r=()=>{},o=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout((()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch{}},i=!1,a=(e=c())=>!!i||!("checkDCE"in e),s=e=>{const t=new Map;let i=0;const a={checkDCE:o,supportsFiber:!0,supportsFlight:!0,hasUnsupportedRendererAttached:!1,renderers:t,onCommitFiberRoot:r,onCommitFiberUnmount:r,onPostCommitFiberRoot:r,inject(n){const r=++i;return t.set(r,n),a._instrumentationIsActive||(a._instrumentationIsActive=!0,e?.()),r},_instrumentationSource:n,_instrumentationIsActive:!1};try{Object.defineProperty(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{value:a})}catch{l(e)}return a},l=e=>{try{const e=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;e._instrumentationSource||(i=a(
@RobPruzan
RobPruzan / rc.js
Last active January 16, 2025 00:37
'use client';
!function(e){"use strict";var t="bippy-0.2.0",n=()=>{},r=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout((()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch{}},o=e=>{const o=new Map;let i=0;const a={checkDCE:r,supportsFiber:!0,supportsFlight:!0,hasUnsupportedRendererAttached:!1,renderers:o,onCommitFiberRoot:n,onCommitFiberUnmount:n,onPostCommitFiberRoot:n,inject(t){const n=++i;return o.set(n,t),a._instrumentationIsActive||(a._instrumentationIsActive=!0,e?.()),n},_instrumentationSource:t,_instrumentationIsActive:!1};try{Object.defineProperty(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{value:a})}catch{}return a},i=()=>Object.prototype.hasOwnProperty.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),a=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return t&&e?.(),i()||(t=o(e)),t};try{"undefined"==t
'use client';
!function(e){"use strict";var t="bippy-0.2.0",n=()=>{},r=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout((()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch{}},o=e=>{const o=new Map;let i=0;const a={checkDCE:r,supportsFiber:!0,supportsFlight:!0,hasUnsupportedRendererAttached:!1,renderers:o,onCommitFiberRoot:n,onCommitFiberUnmount:n,onPostCommitFiberRoot:n,inject(t){const n=++i;return o.set(n,t),a._instrumentationIsActive||(a._instrumentationIsActive=!0,e?.()),n},_instrumentationSource:t,_instrumentationIsActive:!1};try{Object.defineProperty(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{value:a})}catch{}return a},i=()=>Object.prototype.hasOwnProperty.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),a=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return t&&e?.(),i()||(t=o(e)),t};try{"undefined"==t
'use client';
!function(e){"use strict";var t="bippy-0.2.0",n=()=>{},r=e=>{try{Function.prototype.toString.call(e).indexOf("^_^")>-1&&setTimeout((()=>{throw new Error("React is running in production mode, but dead code elimination has not been applied. Read how to correctly configure React for production: https://reactjs.org/link/perf-use-production-build")}))}catch{}},o=e=>{const o=new Map;let i=0;const a={checkDCE:r,supportsFiber:!0,supportsFlight:!0,hasUnsupportedRendererAttached:!1,renderers:o,onCommitFiberRoot:n,onCommitFiberUnmount:n,onPostCommitFiberRoot:n,inject(t){const n=++i;return o.set(n,t),a._instrumentationIsActive||(a._instrumentationIsActive=!0,e?.()),n},_instrumentationSource:t,_instrumentationIsActive:!1};try{Object.defineProperty(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__",{value:a})}catch{}return a},i=()=>Object.prototype.hasOwnProperty.call(globalThis,"__REACT_DEVTOOLS_GLOBAL_HOOK__"),a=e=>{let t=globalThis.__REACT_DEVTOOLS_GLOBAL_HOOK__;return t&&e?.(),i()||(t=o(e)),t};try{"undefined"==t