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
| === RLM Loop === | |
| Prompt: Find Health Canada dosage guidelines for creatine. Search the regulatory documents, read the relevant | |
| sections, and provide the dosage recommendations. | |
| Tools: IngredientAiApp.Agents.Skills.DocumentSkill | |
| Max iterations: 15 | |
| --- iteration 1 --- | |
| (search (map-new :query "creatine dosage guidelines Health Canada" :limit 5)) | |
| > result: map(4) %{"_type" => "Search", "frontmatter" => %{"us/fda/gras/548/gras_submission" => %{"authority" => "FDA... |
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 { type StoreApi } from 'zustand'; | |
| import { type NamedSet } from 'zustand/middleware'; | |
| type FirstSetStateArg<T> = Parameters<StoreApi<T>['setState']>[0]; | |
| export type SetState<T> = (partial: FirstSetStateArg<T>, name?: string) => void; | |
| export type GetState<T> = StoreApi<T>['getState']; | |
| type StateObject = Record<string, any>; | |
| type SliceKey<S extends StateObject> = { |
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 reloadOnUpdate from "virtual:reload-on-update-in-background-script"; | |
| reloadOnUpdate("pages/background"); | |
| import { | |
| type Store, | |
| type StoreApi, | |
| type Dispatch, | |
| type Listener, | |
| } from '@lib/store'; |
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 stream from 'stream'; | |
| import { | |
| S3Client, | |
| CreateMultipartUploadCommand, | |
| UploadPartCommand, | |
| CreateMultipartUploadCommandOutput, | |
| CompleteMultipartUploadCommand, | |
| CompletedPart, | |
| DeleteObjectCommand, |
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 { | |
| Id, | |
| UUID, | |
| Expand, | |
| Require, | |
| } from './types'; | |
| import { | |
| isUUID | |
| } from './uuids'; |
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
| const Editor = () => { | |
| // ... | |
| useTopBarContent( | |
| <ValidationBar /> | |
| ); | |
| return ( | |
| // ... | |
| ); | |
| }; |
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
| declare global { | |
| /** | |
| extend this where needed | |
| */ | |
| export interface Meta { | |
| session?: string; | |
| receipt?: UUID; | |
| } | |
| } |
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 { types, actions } from './actions'; | |
| import apolloClient from '../lib/apolloClient'; | |
| const client = apolloClient(); | |
| const apiQuery = store => next => action => { | |
| next(action); | |
| if (action.type.includes(types.API_QUERY)) { | |
| client.query(action.payload) |
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 { camelCase } from 'camel-case'; | |
| export function createActions(actionTypes) { | |
| const types = {}; | |
| const actions = {}; | |
| actionTypes.forEach(property => { | |
| types[property.replace('/', '_')] = property; | |
| actions[camelCase(property)] = x => ({ type: property, payload: x }); | |
| }); |
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 { isPlainObject, isArray, camelCase, snakeCase } from 'lodash'; | |
| export function snakeKeys(object) { | |
| return deepTransformKeys(object, snakeCase); | |
| } | |
| export function camelKeys(object) { | |
| return deepTransformKeys(object, camelCase); | |
| } |
NewerOlder