diff --git a/.changeset/green-taxis-chew.md b/.changeset/green-taxis-chew.md new file mode 100644 index 0000000..0d9d87a --- /dev/null +++ b/.changeset/green-taxis-chew.md @@ -0,0 +1,9 @@ +--- +"schema-stream": patch +"llm-polyglot": patch +"zod-stream": patch +"evalz": patch +"stream-hooks": patch +--- + +updating docs diff --git a/.syncpackrc b/.syncpackrc new file mode 100644 index 0000000..69dd379 --- /dev/null +++ b/.syncpackrc @@ -0,0 +1,11 @@ +{ + "specifierTypes": ["!workspace-protocol"], + "versionGroups": [ + { + "label": "Use workspace protocol when developing local packages", + "dependencies": ["$LOCAL"], + "dependencyTypes": ["dev", "peer", "optional", "prod"], + "pinVersion": "workspace:*" + } + ] +} \ No newline at end of file diff --git a/.zed/settings.json b/.zed/settings.json deleted file mode 100644 index e69de29..0000000 diff --git a/README.md b/README.md index 544942b..7e3a61f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ ## Overview -Island AI is a collection of low-level utilities and high-level tools for handling structured data streams from Large Language Models (LLMs). The packages range from basic JSON streaming parsers to complete LLM clients, giving you the flexibility to build custom solutions or use pre-built integrations. +Island AI is a collection of low-level utilities and high-level tools for handling structured data streams from LLMs. The packages range from basic JSON streaming parsers to complete LLM clients, giving you the flexibility to build custom solutions or use pre-built integrations. ## Core Packages diff --git a/apps/next-demo/.eslintrc.js b/apps/next-demo/.eslintrc.js deleted file mode 100644 index 8c26244..0000000 --- a/apps/next-demo/.eslintrc.js +++ /dev/null @@ -1,21 +0,0 @@ -/** @type {import("eslint").Linter.Config} */ -module.exports = { - root: true, - extends: ["@repo/eslint-config/next.js"], - parser: "@typescript-eslint/parser", - parserOptions: { - project: true - }, - overrides: [ - { - extends: ["plugin:@typescript-eslint/disable-type-checked"], - files: ["./**/*.mjs", "*.js"] - } - ], - settings: { - tailwindcss: { - callees: ["cn"], - config: "tailwind.config.js" - } - } -} diff --git a/apps/next-demo/CHANGELOG.md b/apps/next-demo/CHANGELOG.md deleted file mode 100644 index 98accb3..0000000 --- a/apps/next-demo/CHANGELOG.md +++ /dev/null @@ -1,132 +0,0 @@ -# island-next-demos - -## 1.0.18 - -### Patch Changes - -- Updated dependencies [[`e192f1a`](https://github.com/hack-dance/island-ai/commit/e192f1a440b60f88f9f6982013ce6785a1e3eb9d)]: - - zod-stream@2.0.1 - - stream-hooks@2.0.0 - -## 1.0.17 - -### Patch Changes - -- Updated dependencies [[`d2a1ee5`](https://github.com/hack-dance/island-ai/commit/d2a1ee5f04e5f95f0755c3ad39766573b29962ca)]: - - stream-hooks@2.0.0 - - zod-stream@2.0.0 - -## 1.0.16 - -### Patch Changes - -- Updated dependencies [[`dcd090c`](https://github.com/hack-dance/island-ai/commit/dcd090cc13022488cfcbd99007933b238bd93f74)]: - - stream-hooks@1.0.4 - -## 1.0.15 - -### Patch Changes - -- Updated dependencies [[`0708276`](https://github.com/hack-dance/island-ai/commit/0708276f32ee6de6ccb81de90a54d6d0e3463ec2)]: - - zod-stream@1.0.3 - -## 1.0.14 - -### Patch Changes - -- Updated dependencies [[`6a018c6`](https://github.com/hack-dance/island-ai/commit/6a018c6d9623120296a3abe954cb43f6209ac937)]: - - zod-stream@1.0.2 - -## 1.0.13 - -### Patch Changes - -- Updated dependencies [[`8d0ec77`](https://github.com/hack-dance/island-ai/commit/8d0ec77948510ff7aedf6327fdaa168a89873e76)]: - - zod-stream@1.0.1 - -## 1.0.12 - -### Patch Changes - -- Updated dependencies [[`1f6b63175bf5baa787b0e38e8decb1c811a49bec`](https://github.com/hack-dance/island-ai/commit/1f6b63175bf5baa787b0e38e8decb1c811a49bec)]: - - zod-stream@1.0.0 - - stream-hooks@1.0.0 - -## 1.0.11 - -### Patch Changes - -- Updated dependencies []: - - zod-stream@0.0.8 - - stream-hooks@0.0.4 - -## 1.0.10 - -### Patch Changes - -- Updated dependencies [[`a79bd11a9caaf4f9d99eebe0e528b04fd4ca811e`](https://github.com/hack-dance/island-ai/commit/a79bd11a9caaf4f9d99eebe0e528b04fd4ca811e)]: - - stream-hooks@0.0.3 - -## 1.0.9 - -### Patch Changes - -- Updated dependencies [[`17f8583a9284731be3dcc4c2b59b6733f49c8383`](https://github.com/hack-dance/island-ai/commit/17f8583a9284731be3dcc4c2b59b6733f49c8383)]: - - zod-stream@0.0.7 - -## 1.0.8 - -### Patch Changes - -- Updated dependencies [[`5e8a2cc7bfe39452928a434675bd23539890814a`](https://github.com/hack-dance/island-ai/commit/5e8a2cc7bfe39452928a434675bd23539890814a)]: - - zod-stream@0.0.6 - -## 1.0.7 - -### Patch Changes - -- Updated dependencies [[`bf334a0f23ace44e866a37b3111ac0f312f32929`](https://github.com/hack-dance/island-ai/commit/bf334a0f23ace44e866a37b3111ac0f312f32929), [`6ab5c4076c35b8b7935886eda6225b2cd7b374e2`](https://github.com/hack-dance/island-ai/commit/6ab5c4076c35b8b7935886eda6225b2cd7b374e2)]: - - zod-stream@0.0.5 - -## 1.0.6 - -### Patch Changes - -- Updated dependencies [[`274d6af9530e9437035dda14f92948703b20dd93`](https://github.com/hack-dance/island-ai/commit/274d6af9530e9437035dda14f92948703b20dd93)]: - - zod-stream@0.0.4 - -## 1.0.5 - -### Patch Changes - -- Updated dependencies [[`068d069798b07af96d03d9c2f063806ee04ee980`](https://github.com/hack-dance/island-ai/commit/068d069798b07af96d03d9c2f063806ee04ee980)]: - - zod-stream@0.0.4 - -## 1.0.4 - -### Patch Changes - -- Updated dependencies [[`e922466f35bd72bdfce8c0710a8868cca66f1571`](https://github.com/hack-dance/island-ai/commit/e922466f35bd72bdfce8c0710a8868cca66f1571)]: - - zod-stream@0.0.3 - -## 1.0.3 - -### Patch Changes - -- Updated dependencies [[`fb5fd7354cbf5c8cdda46ff5bac5e1a2a72b6f59`](https://github.com/hack-dance/island-ai/commit/fb5fd7354cbf5c8cdda46ff5bac5e1a2a72b6f59)]: - - zod-stream@0.0.2 - -## 1.0.2 - -### Patch Changes - -- Updated dependencies [[`2e9c39de36385887f0a8fd3c7c69302f7981cbf0`](https://github.com/hack-dance/island-ai/commit/2e9c39de36385887f0a8fd3c7c69302f7981cbf0)]: - - stream-hooks@0.0.2 - -## 1.0.1 - -### Patch Changes - -- Updated dependencies [[`c3cbe97f01f3532038dc041ccb9a43e2cdb73e97`](https://github.com/hack-dance/island-ai/commit/c3cbe97f01f3532038dc041ccb9a43e2cdb73e97)]: - - stream-hooks@0.0.1 - - zod-stream@0.0.1 diff --git a/apps/next-demo/README.md b/apps/next-demo/README.md deleted file mode 100644 index fc72a5c..0000000 --- a/apps/next-demo/README.md +++ /dev/null @@ -1 +0,0 @@ -# demo diff --git a/apps/next-demo/moonlight-ii.json b/apps/next-demo/moonlight-ii.json deleted file mode 100644 index 20bc983..0000000 --- a/apps/next-demo/moonlight-ii.json +++ /dev/null @@ -1,960 +0,0 @@ -{ - "name": "Moonlight II", - "type": "dark", - "colors": { - "foreground": "#c8d3f5", - "focusBorder": "#82aaff", - "contrastBorder": "#15151b", - "editorCursor.foreground": "#82aaff", - "editorRuler.foreground": "#444a73bb", - "scrollbar.shadow": "#00000022", - "tree.indentGuidesStroke": "#828bb866", - "editorLink.activeForeground": "#c8d3f5", - "selection.background": "#c8d3f5", - "progressBar.background": "#82aaff", - "textLink.foreground": "#65bcff", - "textLink.activeForeground": "#b2dfff", - "editorLineNumber.foreground": "#444a73", - "editorLineNumber.activeForeground": "#828bb8", - "editorBracketMatch.border": "#82aaffbb", - "editorBracketMatch.background": "#1F2028", - "editorWhitespace.foreground": "#c8d3f540", - "editor.background": "#1F2028", - "editor.foreground": "#c8d3f5", - "editor.lineHighlightBackground": "#2f334d", - "editor.selectionBackground": "#828bb850", - "editor.selectionHighlightBackground": "#444a73", - "editor.findMatchBackground": "#444a73", - "editor.findMatchBorder": "#86e1fc", - "editor.findMatchHighlightBackground": "#444a73", - "editorOverviewRuler.findMatchForeground": "#86e1fcbb", - "editorOverviewRuler.errorForeground": "#ff757fcc", - "editorOverviewRuler.infoForeground": "#65bcff66", - "editorOverviewRuler.warningForeground": "#ffc777cc", - "editorOverviewRuler.modifiedForeground": "#82aaff66", - "editorOverviewRuler.addedForeground": "#c3e88d66", - "editorOverviewRuler.deletedForeground": "#ff98a466", - "editorOverviewRuler.bracketMatchForeground": "#3e68d7bb", - "editorOverviewRuler.border": "#1F2028", - "editorHoverWidget.background": "#15151b", - "editorHoverWidget.border": "#000000aa", - "editorIndentGuide.background": "#444a73bb", - "editorIndentGuide.activeBackground": "#828bb8aa", - "editorGroupHeader.tabsBackground": "#1c1d24", - "editorGroup.border": "#15151b", - "editorGutter.modifiedBackground": "#82aaff66", - "editorGutter.addedBackground": "#c3e88d66", - "editorGutter.deletedBackground": "#ff5370aa", - "tab.activeBorder": "#82aaff", - "tab.activeModifiedBorder": "#828bb8", - "tab.unfocusedActiveBorder": "#828bb8", - "tab.activeForeground": "#c8d3f5", - "tab.activeBackground": "#1F2028", - "tab.inactiveForeground": "#828bb8", - "tab.inactiveBackground": "#1c1d24", - "tab.unfocusedActiveForeground": "#c8d3f5", - "tab.border": "#15151b", - "statusBar.noFolderBackground": "#1F2028", - "statusBar.border": "#15151b", - "statusBar.background": "#1c1d24", - "statusBar.foreground": "#828bb8", - "statusBar.debuggingBackground": "#baacff", - "statusBar.debuggingForeground": "#c8d3f5", - "statusBarItem.hoverBackground": "#828bb820", - "activityBar.background": "#1c1d24", - "activityBar.border": "#1F202860", - "activityBar.foreground": "#b4c2f0", - "activityBarBadge.background": "#3e68d7", - "activityBarBadge.foreground": "#ffffff", - "titleBar.activeBackground": "#1c1d24", - "titleBar.activeForeground": "#c8d3f5", - "titleBar.inactiveBackground": "#1c1d24", - "titleBar.inactiveForeground": "#828bb8", - "sideBar.background": "#1c1d24", - "sideBar.foreground": "#828bb8", - "sideBar.border": "#15151b", - "titleBar.border": "#15151b", - "sideBarTitle.foreground": "#c8d3f5", - "sideBarSectionHeader.background": "#1c1d24", - "sideBarSectionHeader.border": "#2f334d", - "input.background": "#15151b", - "input.foreground": "#c8d3f5", - "input.placeholderForeground": "#c8d3f5aa", - "input.border": "#00000066", - "inputValidation.errorBackground": "#c53b53", - "inputValidation.errorForeground": "#ffffff", - "inputValidation.errorBorder": "#ff537050", - "inputValidation.infoBackground": "#446bbb", - "inputValidation.infoForeground": "#ffffff", - "inputValidation.infoBorder": "#82aaff50", - "inputValidation.warningBackground": "#ad7c43", - "inputValidation.warningForeground": "#ffffff", - "inputValidation.warningBorder": "#ffc77750", - "dropdown.foreground": "#c8d3f5", - "dropdown.background": "#2f334d", - "dropdown.border": "#00000066", - "list.hoverForeground": "#c8d3f5", - "list.hoverBackground": "#1c1d24", - "list.activeSelectionBackground": "#383e5c", - "list.activeSelectionForeground": "#ffffff", - "list.inactiveSelectionForeground": "#c8d3f5", - "list.inactiveSelectionBackground": "#292e46", - "list.focusBackground": "#131421", - "list.focusForeground": "#c8d3f5", - "list.highlightForeground": "#86e1fc", - "list.warningForeground": "#ffc777cc", - "terminal.foreground": "#bcc4d6", - "terminal.selectionBackground": "#c8d3f544", - "terminal.ansiWhite": "#c8d3f5", - "terminal.ansiBlack": "#000000", - "terminal.ansiBlue": "#82aaff", - "terminal.ansiCyan": "#86e1fc", - "terminal.ansiGreen": "#c3e88d", - "terminal.ansiMagenta": "#fca7ea", - "terminal.ansiRed": "#ff757f", - "terminal.ansiYellow": "#ffc777", - "terminal.ansiBrightWhite": "#c8d3f5", - "terminal.ansiBrightBlack": "#828bb8", - "terminal.ansiBrightBlue": "#82aaff", - "terminal.ansiBrightCyan": "#86e1fc", - "terminal.ansiBrightGreen": "#c3e88d", - "terminal.ansiBrightMagenta": "#fca7ea", - "terminal.ansiBrightRed": "#ff757f", - "terminal.ansiBrightYellow": "#ffc777", - "terminal.border": "#2f334d", - "scrollbarSlider.background": "#828bb830", - "scrollbarSlider.hoverBackground": "#a9b8e830", - "scrollbarSlider.activeBackground": "#82aaff", - "minimap.findMatchHighlight": "#86e1fccc", - "minimap.selectionHighlight": "#86e1fc33", - "minimapGutter.addedBackground": "#c3e88d66", - "minimapGutter.modifiedBackground": "#82aaff66", - "editorSuggestWidget.background": "#15151b", - "editorSuggestWidget.foreground": "#a9b8e8", - "editorSuggestWidget.highlightForeground": "#86e1fc", - "editorSuggestWidget.selectedBackground": "#2f334d", - "editorSuggestWidget.border": "#00000033", - "editorError.foreground": "#ff5370", - "editorWarning.foreground": "#ffc777cc", - "editorWidget.background": "#1c1d24", - "editorWidget.resizeBorder": "#82aaff", - "editorMarkerNavigation.background": "#c8d3f505", - "widget.shadow": "#00000033", - "panel.border": "#00000033", - "panel.background": "#1c1d24", - "panel.dropBackground": "#c8d3f5", - "panelTitle.inactiveForeground": "#828bb8", - "panelTitle.activeForeground": "#c8d3f5", - "panelTitle.activeBorder": "#82aaff", - "terminalCursor.foreground": "#82aaff", - "diffEditor.insertedTextBackground": "#c3e88d15", - "diffEditor.removedTextBackground": "#ff537020", - "notifications.background": "#15151b", - "notifications.foreground": "#c8d3f5", - "notificationLink.foreground": "#82aaff", - "badge.background": "#3e68d7", - "badge.foreground": "#ffffff", - "button.background": "#3e68d7", - "button.hoverBackground": "#65bcffcc", - "extensionButton.prominentBackground": "#3e68d7", - "extensionButton.prominentHoverBackground": "#65bcffcc", - "peekView.border": "#00000030", - "peekViewEditor.background": "#c8d3f505", - "peekViewTitle.background": "#c8d3f505", - "peekViewResult.background": "#c8d3f505", - "peekViewEditorGutter.background": "#c8d3f505", - "peekViewTitleDescription.foreground": "#c8d3f560", - "peekViewResult.matchHighlightBackground": "#828bb850", - "peekViewEditor.matchHighlightBackground": "#828bb850", - "debugToolBar.background": "#1c1d24", - "pickerGroup.foreground": "#82aaff", - "gitDecoration.deletedResourceForeground": "#ff5370dd", - "gitDecoration.conflictingResourceForeground": "#ffc777cc", - "gitDecoration.modifiedResourceForeground": "#82aaffee", - "gitDecoration.untrackedResourceForeground": "#77e0c6dd", - "gitDecoration.ignoredResourceForeground": "#777fabaa", - "gitlens.trailingLineForegroundColor": "#828bb8aa", - "editorCodeLens.foreground": "#828bb8", - "peekViewResult.selectionBackground": "#828bb870", - "breadcrumb.background": "#1F2028", - "breadcrumb.foreground": "#828bb8", - "breadcrumb.focusForeground": "#c8d3f5", - "breadcrumb.activeSelectionForeground": "#82aaff", - "breadcrumbPicker.background": "#1c1d24", - "menu.background": "#1c1d24", - "menu.foreground": "#c8d3f5", - "menu.selectionBackground": "#00000050", - "menu.selectionForeground": "#82aaff", - "menu.selectionBorder": "#00000030", - "menu.separatorBackground": "#c8d3f5", - "menubar.selectionBackground": "#00000030", - "menubar.selectionForeground": "#82aaff", - "menubar.selectionBorder": "#00000030", - "settings.dropdownForeground": "#c8d3f5", - "settings.dropdownBackground": "#2f334d", - "settings.dropdownBorder": "#15151b", - "settings.numberInputForeground": "#c8d3f5", - "settings.numberInputBackground": "#15151b", - "settings.numberInputBorder": "#00000066", - "settings.textInputForeground": "#c8d3f5", - "settings.textInputBackground": "#15151b", - "settings.textInputBorder": "#00000066", - "settings.headerForeground": "#82aaff", - "settings.modifiedItemIndicator": "#82aaff", - "settings.checkboxBackground": "#131421", - "settings.checkboxForeground": "#c8d3f5", - "settings.checkboxBorder": "#00000066" - }, - "tokenColors": [ - { - "name": "Comment", - "scope": ["comment", "punctuation.definition.comment", "string.quoted.docstring"], - "settings": { - "foreground": "#858aa6" - } - }, - { - "name": "Variables and Plain Text", - "scope": ["variable", "support.variable", "string constant.other.placeholder", "text.html"], - "settings": { - "foreground": "#c8d3f5" - } - }, - { - "name": "DOM Variables", - "scope": [ - "support.variable.dom", - "support.constant.math", - "support.type.object.module", - "support.variable.object.process", - "support.constant.json" - ], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Nil", - "scope": ["constant.language.undefined", "constant.language.null"], - "settings": { - "foreground": "#7f85a3" - } - }, - { - "name": "PHP Constants", - "scope": ["constant.other.php"], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Colors", - "scope": ["constant.other.color"], - "settings": { - "foreground": "#ffffff" - } - }, - { - "name": "Invalid", - "scope": ["invalid", "invalid.illegal"], - "settings": { - "foreground": "#ff5370" - } - }, - { - "name": "Invalid deprecated", - "scope": ["invalid.deprecated"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Keyword, Storage", - "scope": ["keyword", "storage.type", "storage.modifier", "keyword.other.important"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Keyword, Storage", - "scope": ["keyword.control", "storage"], - "settings": {} - }, - { - "name": "Interpolation", - "scope": ["punctuation.definition.template-expression", "punctuation.section.embedded"], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Spread", - "scope": ["keyword.operator.spread", "keyword.operator.rest"], - "settings": { - "foreground": "#ff757f", - "fontStyle": "bold" - } - }, - { - "name": "Operator, Misc", - "scope": [ - "keyword.operator", - "keyword.control", - "punctuation", - "punctuation.definition.string", - "punctuation.support.type.property-name", - "text.html.vue-html meta.tag", - "punctuation.definition.keyword", - "punctuation.terminator.rule", - "punctuation.definition.entity", - "constant.other.color", - "meta.tag", - "punctuation.definition.tag", - "punctuation.separator.inheritance.php", - "punctuation.definition.block.tag", - "punctuation.definition.tag.html", - "punctuation.definition.tag.begin.html", - "punctuation.definition.tag.end.html", - "meta.property-list", - "meta.brace.square", - "keyword.other.template", - "keyword.other.substitution" - ], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Keyword Control", - "scope": ["keyword.control"], - "settings": {} - }, - { - "name": "Tag", - "scope": ["entity.name.tag", "meta.tag", "markup.deleted.git_gutter"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "Function, Special Method", - "scope": ["entity.name.function", "variable.function", "keyword.other.special-method"], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "Support Function", - "scope": ["support.function", "meta.function-call entity.name.function"], - "settings": { - "foreground": "#65bcff" - } - }, - { - "name": "C-related Block Level Variables", - "scope": ["source.cpp meta.block variable.other"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "Other Variable, String Link", - "scope": ["support.other.variable", "string.other.link"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "Constant, Function Argument, Tag Attribute, Embedded", - "scope": [ - "variable.other.constant", - "constant.language", - "keyword.other.type.php", - "storage.type.php", - "support.constant", - "constant.character", - "constant.escape", - "keyword.other.unit" - ], - "settings": { - "foreground": "#ff98a4" - } - }, - { - "name": "Number, Boolean", - "scope": [ - "constant.numeric", - "constant.language.boolean", - "constant.language.json", - "constant.language.infinity", - "constant.language.nan" - ], - "settings": { - "foreground": "#ff966c" - } - }, - { - "name": "Function Argument", - "scope": [ - "variable.parameter.function.language.special", - "variable.parameter", - "meta.function.parameter variable" - ], - "settings": { - "foreground": "#fca7ea" - } - }, - { - "name": "String, Symbols, Inherited Class, Markup Heading", - "scope": [ - "string", - "constant.other.symbol", - "constant.other.key", - "entity.other.inherited-class", - "markup.heading", - "markup.inserted.git_gutter", - "meta.group.braces.curly constant.other.object.key.js string.unquoted.label.js", - "meta.attribute-selector" - ], - "settings": { - "fontStyle": "", - "foreground": "#c3e88d" - } - }, - { - "name": "Object", - "scope": ["variable.other.object"], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Object Key", - "scope": [ - "meta.object-literal.key", - "string.alias.graphql", - "string.unquoted.graphql", - "string.unquoted.alias.graphql", - "meta.field.declaration.ts variable.object.property", - "variable.object.property" - ], - "settings": { - "foreground": "#4fd6be" - } - }, - { - "name": "Nested Object Property", - "scope": ["meta.object.member", "variable.other.object.property"], - "settings": { - "foreground": "#a9b8e8" - } - }, - { - "name": "Object Property", - "scope": [ - "variable.other.property", - "support.variable.property", - "support.variable.property.dom" - ], - "settings": { - "foreground": "#a9b8e8" - } - }, - { - "name": "Haskell Constants", - "scope": ["source.haskell constant.other.haskell"], - "settings": { - "foreground": "#ff98a4" - } - }, - { - "name": "Haskell Imports", - "scope": ["source.haskell meta.import.haskell entity.name.namespace"], - "settings": { - "foreground": "#c8d3f5" - } - }, - { - "name": "Types Fixes", - "scope": ["source.haskell storage.type", "source.c storage.type", "source.java storage.type"], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Lambda Arrow", - "scope": ["storage.type.function"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Class, Support", - "scope": [ - "entity.name", - "support.type", - "support.class", - "support.orther.namespace.use.php", - "meta.use.php", - "support.other.namespace.php", - "markup.changed.git_gutter", - "support.type.sys-types" - ], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Entity types", - "scope": ["support.type"], - "settings": { - "foreground": "#ff966c" - } - }, - { - "name": "CSS Class and Support", - "scope": [ - "source.css support.type.property-name", - "source.sass support.type.property-name", - "source.scss support.type.property-name", - "source.less support.type.property-name", - "source.stylus support.type.property-name", - "source.postcss support.type.property-name", - "support.type.property-name.css", - "support.type.vendored.property-name" - ], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "Sub-methods", - "scope": ["entity.name.module.js", "variable.import.parameter.js", "variable.other.class.js"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "Language methods", - "scope": ["variable.language"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "entity.name.method.js", - "scope": ["entity.name.method.js"], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "meta.method.js", - "scope": ["meta.class-method.js entity.name.function.js", "variable.function.constructor"], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "Attributes", - "scope": ["entity.other.attribute-name"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "HTML Attributes", - "scope": [ - "text.html.basic entity.other.attribute-name.html", - "text.html.basic entity.other.attribute-name" - ], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "HTML Doctype", - "scope": [ - "meta.tag.metadata.doctype entity.name.tag", - "meta.tag.metadata.doctype entity.other.attribute-name" - ], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "CSS Classes", - "scope": ["entity.other.attribute-name.class"], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "CSS ID's", - "scope": ["source.sass keyword.control"], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "CSS psuedo selectors", - "scope": [ - "entity.other.attribute-name.pseudo-class", - "entity.other.attribute-name.pseudo-element" - ], - "settings": { - "foreground": "#4fd6be" - } - }, - { - "name": "CSS Property value", - "scope": ["support.constant.property-value"], - "settings": { - "foreground": "#fca7ea" - } - }, - { - "name": "Inserted", - "scope": ["markup.inserted"], - "settings": { - "foreground": "#c3e88d" - } - }, - { - "name": "Deleted", - "scope": ["markup.deleted"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "Changed", - "scope": ["markup.changed"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Regular Expressions", - "scope": ["string.regexp"], - "settings": { - "foreground": "#b4f9f8" - } - }, - { - "name": "Regular Expressions - Punctuation", - "scope": ["punctuation.definition.group"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "Regular Expressions - Character Class", - "scope": ["constant.other.character-class.regexp", "keyword.control.anchor.regexp"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Regular Expressions - Character Class Set", - "scope": ["constant.other.character-class.set.regexp"], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Regular Expressions - Quantifier", - "scope": ["keyword.operator.quantifier.regexp"], - "settings": { - "foreground": "#fca7ea" - } - }, - { - "name": "Escape Characters", - "scope": ["constant.character.escape"], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "URL", - "scope": ["*url*", "*link*", "*uri*"], - "settings": { - "fontStyle": "underline" - } - }, - { - "name": "Decorators", - "scope": [ - "tag.decorator.js entity.name.tag.js", - "tag.decorator.js punctuation.definition.tag.js" - ], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "CSS Units", - "scope": ["keyword.other.unit"], - "settings": { - "foreground": "#fc7b7b" - } - }, - { - "name": "ES7 Bind Operator", - "scope": ["source.js constant.other.object.key.js string.unquoted.label.js"], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "JSON Key - Level 0", - "scope": ["source.json meta.structure.dictionary.json support.type.property-name.json"], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "JSON Key - Level 1", - "scope": [ - "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" - ], - "settings": { - "foreground": "#65bcff" - } - }, - { - "name": "JSON Key - Level 2", - "scope": [ - "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" - ], - "settings": { - "foreground": "#ff757f" - } - }, - { - "name": "JSON Key - Level 3", - "scope": [ - "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" - ], - "settings": { - "foreground": "#fca7ea" - } - }, - { - "name": "JSON Key - Level 4", - "scope": [ - "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" - ], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "JSON Key - Level 5", - "scope": [ - "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" - ], - "settings": { - "foreground": "#4fd6be" - } - }, - { - "name": "JSON Key - Level 6", - "scope": [ - "source.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json meta.structure.dictionary.value.json meta.structure.dictionary.json support.type.property-name.json" - ], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "Plain Punctuation", - "scope": ["punctuation.definition.list_item.markdown"], - "settings": { - "foreground": "#828bb8" - } - }, - { - "name": "Block Punctuation", - "scope": [ - "meta.block", - "meta.brace", - "punctuation.definition.block", - "punctuation.definition.parameters", - "punctuation.section.function" - ], - "settings": { - "foreground": "#b4c2f0" - } - }, - { - "name": "Markdown - Plain", - "scope": ["meta.jsx.children", "meta.embedded.block"], - "settings": { - "foreground": "#b4c2f0" - } - }, - { - "name": "Markdown - Markup Raw Inline", - "scope": ["text.html.markdown markup.inline.raw.markdown"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Markdown - Markup Raw Inline Punctuation", - "scope": [ - "text.html.markdown markup.inline.raw.markdown punctuation.definition.raw.markdown" - ], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Markdown - Heading punctuation", - "scope": [ - "markdown.heading", - "markup.heading | markup.heading entity.name", - "markup.heading.markdown punctuation.definition.heading.markdown" - ], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Markup - Italic", - "scope": ["markup.italic"], - "settings": { - "fontStyle": "italic", - "foreground": "#ff757f" - } - }, - { - "name": "Markup - Bold", - "scope": ["markup.bold", "markup.bold string"], - "settings": { - "fontStyle": "bold", - "foreground": "#ff757f" - } - }, - { - "name": "Markup - Bold-Italic", - "scope": [ - "markup.bold markup.italic", - "markup.italic markup.bold", - "markup.quote markup.bold", - "markup.bold markup.italic string", - "markup.italic markup.bold string", - "markup.quote markup.bold string" - ], - "settings": { - "fontStyle": "bold", - "foreground": "#ff757f" - } - }, - { - "name": "Markup - Underline", - "scope": ["markup.underline"], - "settings": { - "fontStyle": "underline", - "foreground": "#ff966c" - } - }, - { - "name": "Markdown - Blockquote", - "scope": ["markup.quote punctuation.definition.blockquote.markdown"], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Markup - Quote", - "scope": ["markup.quote"], - "settings": { - "fontStyle": "italic" - } - }, - { - "name": "Markdown - Link", - "scope": ["string.other.link.title.markdown"], - "settings": { - "foreground": "#82aaff" - } - }, - { - "name": "Markdown - Link Description", - "scope": ["string.other.link.description.title.markdown"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Markdown - Link Anchor", - "scope": ["constant.other.reference.link.markdown"], - "settings": { - "foreground": "#ffc777" - } - }, - { - "name": "Markup - Raw Block", - "scope": ["markup.raw.block"], - "settings": { - "foreground": "#c099ff" - } - }, - { - "name": "Markdown - Fenced Bode Block Variable", - "scope": ["markup.fenced_code.block.markdown", "markup.inline.raw.string.markdown"], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Markdown - Fenced Language", - "scope": ["variable.language.fenced.markdown"], - "settings": { - "foreground": "#86e1fc" - } - }, - { - "name": "Markdown - Separator", - "scope": ["meta.separator"], - "settings": { - "fontStyle": "bold", - "foreground": "#86e1fc" - } - }, - { - "name": "Markup - Table", - "scope": ["markup.table"], - "settings": { - "foreground": "#828bb8" - } - }, - { - "scope": "token.info-token", - "settings": { - "foreground": "#65bcff" - } - }, - { - "scope": "token.warn-token", - "settings": { - "foreground": "#ffc777" - } - }, - { - "scope": "token.error-token", - "settings": { - "foreground": "#ff757f" - } - }, - { - "scope": "token.debug-token", - "settings": { - "foreground": "#c099ff" - } - } - ] -} diff --git a/apps/next-demo/next-env.d.ts b/apps/next-demo/next-env.d.ts deleted file mode 100644 index 4f11a03..0000000 --- a/apps/next-demo/next-env.d.ts +++ /dev/null @@ -1,5 +0,0 @@ -/// -/// - -// NOTE: This file should not be edited -// see https://nextjs.org/docs/basic-features/typescript for more information. diff --git a/apps/next-demo/next.config.mjs b/apps/next-demo/next.config.mjs deleted file mode 100644 index 9080a14..0000000 --- a/apps/next-demo/next.config.mjs +++ /dev/null @@ -1,21 +0,0 @@ -import fs from "fs" -import createMDX from "@next/mdx" -import rehypePrettyCode from "rehype-pretty-code" -import remarkGfm from "remark-gfm" - -/** @type {import('next').NextConfig} */ -const nextConfig = {} - -const options = { - keepBackground: false, - theme: JSON.parse(fs.readFileSync(new URL("./moonlight-ii.json", import.meta.url))) -} - -const withMDX = createMDX({ - options: { - extension: /\.mdx?$/, - remarkPlugins: [remarkGfm], - rehypePlugins: [[rehypePrettyCode, options]] - } -}) -export default withMDX(nextConfig) diff --git a/apps/next-demo/package.json b/apps/next-demo/package.json deleted file mode 100644 index bc22af9..0000000 --- a/apps/next-demo/package.json +++ /dev/null @@ -1,64 +0,0 @@ -{ - "name": "island-next-demos", - "version": "1.0.18", - "private": true, - "scripts": { - "dev": "next dev --port=4000", - "build": "next build", - "start": "next start", - "lint": "eslint . --max-warnings 0" - }, - "dependencies": { - "@mdx-js/loader": "^2.3.0", - "@mdx-js/react": "^2.3.0", - "@next/mdx": "^13.4.19", - "@next/eslint-plugin-next": "^14.0.2", - "zod-stream": "workspace:*", - "stream-hooks": "workspace:*", - "@repo/constants": "workspace:*", - "@repo/eslint-config": "workspace:*", - "@repo/tailwind-config": "workspace:*", - "@repo/typescript-config": "workspace:*", - "@repo/ui": "workspace:*", - "@types/eslint": "^8.44.7", - "@types/mdx": "^2.0.7", - "@types/node": "^17.0.12", - "@types/react": "^18.3.2", - "@types/react-dom": "^18.3.0", - "@vercel/analytics": "^1.1.1", - "@vercel/kv": "^0.2.2", - "@vercel/speed-insights": "latest", - "avvvatars-react": "^0.4.2", - "class-variance-authority": "^0.7.0", - "clsx": "^1.2.1", - "cmdk": "^0.2.0", - "cookies": "^0.8.0", - "date-fns": "^2.30.0", - "framer-motion": "^10.12.18", - "js-tiktoken": "^1.0.7", - "jsonwebtoken": "^9.0.2", - "lucide-react": "latest", - "next": "14.2.3", - "next-themes": "^0.2.1", - "openai": "4.24.1", - "ramda": "^0.29.0", - "react": "18.3.1", - "react-dom": "18.3.1", - "react-markdown": "^8.0.7", - "rehype-highlight": "^6.0.0", - "rehype-pretty-code": "^0.10.1", - "remark-gfm": "^3.0.1", - "shiki": "^0.14.4", - "sonner": "^1.3.1", - "svix": "^1.13.0", - "tailwind-merge": "^1.13.2", - "tailwindcss": "^3.2.2", - "tailwindcss-animate": "^1.0.6", - "tippy.js": "^6.3.7", - "typescript": "^5.2.2", - "use-debounce": "^9.0.4", - "use-immer": "^0.9.0", - "vaul": "^0.7.9", - "zod": "^3.23.3" - } -} diff --git a/apps/next-demo/postcss.config.js b/apps/next-demo/postcss.config.js deleted file mode 100644 index 2d17c8b..0000000 --- a/apps/next-demo/postcss.config.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - plugins: { - "postcss-import": {}, - "tailwindcss/nesting": {}, - "tailwindcss": {}, - "autoprefixer": {} - } -} diff --git a/apps/next-demo/public/favicon.ico b/apps/next-demo/public/favicon.ico deleted file mode 100644 index 446e4c5..0000000 Binary files a/apps/next-demo/public/favicon.ico and /dev/null differ diff --git a/apps/next-demo/public/favicon.png b/apps/next-demo/public/favicon.png deleted file mode 100644 index e7396ad..0000000 Binary files a/apps/next-demo/public/favicon.png and /dev/null differ diff --git a/apps/next-demo/src/app/api/ai/chat/route.ts b/apps/next-demo/src/app/api/ai/chat/route.ts deleted file mode 100644 index 33737f9..0000000 --- a/apps/next-demo/src/app/api/ai/chat/route.ts +++ /dev/null @@ -1,52 +0,0 @@ -import { coreAgentSchema } from "@/schemas/core" -import OpenAI from "openai" -import { z } from "zod" -import { OAIStream, withResponseModel } from "zod-stream" - -import { jsonToZod } from "@/lib/json-to-zod" - -const oai = new OpenAI({ - apiKey: process.env["OPENAI_API_KEY"] ?? undefined, - organization: process.env["OPENAI_ORG_ID"] ?? undefined -}) - -export const runtime = "edge" - -interface IRequest { - messages: OpenAI.ChatCompletionMessageParam[] - schema?: string -} - -export async function POST(request: Request) { - const { messages, schema } = (await request.json()) as IRequest - - let resolvedSchema: z.AnyZodObject = coreAgentSchema - - if (schema) { - const potentialSchema = jsonToZod(schema) - if (potentialSchema instanceof Error) { - throw potentialSchema - } - - resolvedSchema = potentialSchema - } - - const params = withResponseModel({ - response_model: { schema: resolvedSchema, name: "Extract" }, - params: { - messages, - model: "gpt-4o-mini", - stream: true - }, - mode: "TOOLS" - }) - - // @ts-ignore - const extractionStream = await oai.chat.completions.create(params) - - return new Response( - OAIStream({ - res: extractionStream - }) - ) -} diff --git a/apps/next-demo/src/app/extract/page.tsx b/apps/next-demo/src/app/extract/page.tsx deleted file mode 100644 index 521ab19..0000000 --- a/apps/next-demo/src/app/extract/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { ExtractTest } from "@/components/extract-test" - -export default async function Page() { - return ( -
-
-
- -
-
-
- ) -} diff --git a/apps/next-demo/src/app/layout.tsx b/apps/next-demo/src/app/layout.tsx deleted file mode 100644 index 4725aa1..0000000 --- a/apps/next-demo/src/app/layout.tsx +++ /dev/null @@ -1,88 +0,0 @@ -import "@/styles/globals.css" - -import { ReactNode } from "react" -import { Metadata } from "next" -import Link from "next/link" - -import { siteConfig } from "@/config/site" -import { cn } from "@/lib/utils" -import { LogoMark } from "@/components/logo-mark" -import ModeToggle from "@/components/mode-toggle" -import { defaultFontMapper } from "@/styles/fonts" - -import Providers from "./providers" - -export const metadata: Metadata = { - title: siteConfig.name, - description: siteConfig.description -} - -export const viewport = { - width: "device-width", - initialScale: 1, - maximumScale: 1, - interactiveWidget: "resizes-content" -} - -export default function RootLayout({ children }: { children: ReactNode }) { - return ( - - - - <> -
-
-
-
-
-

- - - -

- - -
-
- -
-
- -
-
-
-
- -
- {children} -
-
- -
- - - ) -} diff --git a/apps/next-demo/src/app/page.tsx b/apps/next-demo/src/app/page.tsx deleted file mode 100644 index 6092212..0000000 --- a/apps/next-demo/src/app/page.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import { StreamTest } from "@/components/stream-test" - -export default async function Page() { - return ( -
-
-
- -
-
-
- ) -} diff --git a/apps/next-demo/src/app/providers.tsx b/apps/next-demo/src/app/providers.tsx deleted file mode 100644 index 7c5a853..0000000 --- a/apps/next-demo/src/app/providers.tsx +++ /dev/null @@ -1,13 +0,0 @@ -"use client" - -import { Toaster } from "@repo/ui/components/ui/toaster" -import { ThemeProvider } from "next-themes" - -export default function Providers({ children }: { children: React.ReactNode }) { - return ( - - - {children} - - ) -} diff --git a/apps/next-demo/src/components/extract-test.tsx b/apps/next-demo/src/components/extract-test.tsx deleted file mode 100644 index 718f572..0000000 --- a/apps/next-demo/src/components/extract-test.tsx +++ /dev/null @@ -1,125 +0,0 @@ -"use client" - -import { useState } from "react" -import { Button } from "@repo/ui/components/ui/button" -import { Textarea } from "@repo/ui/components/ui/textarea" -import { Loader2 } from "lucide-react" -import ZodStream from "zod-stream" - -import { jsonToZod } from "@/lib/json-to-zod" - -export function ExtractTest() { - const [prompt] = useState("go") - - const [result, setResult] = useState({}) - const [schema, setSchema] = useState( - `{ "users": [{ "name": "string", "email": "string", "twitter": "string" }], "budget": 123, "meetingDate": "1/2/23"}` - ) - const [text, setText] = useState(` - In our recent online meeting, participants from various backgrounds joined to discuss the upcoming tech conference. The names and contact details of the participants were as follows: - - - Name: John Doe, Email: johndoe@email.com, Twitter: @TechGuru44 - - Name: Jane Smith, Email: janesmith@email.com, Twitter: @DigitalDiva88 - - Name: Alex Johnson, Email: alexj@email.com, Twitter: @CodeMaster2023 - - During the meeting, we agreed on several key points. The conference will be held on March 15th, 2024, at the Grand Tech Arena located at 4521 Innovation Drive. Dr. Emily Johnson, a renowned AI researcher, will be our keynote speaker. - - The budget for the event is set at $50,000, covering venue costs, speaker fees, and promotional activities. Each participant is expected to contribute an article to the conference blog by February 20th. - - A follow-up meeting is scheduled for January 25th at 3 PM GMT to finalize the agenda and confirm the list of speakers. - `) - - const [loading, setLoading] = useState(false) - - const startStream = async ({ url }: { url: string }) => { - setLoading(true) - - try { - const completion = async () => { - const response = await fetch(url, { - method: "POST", - body: JSON.stringify({ - schema, - messages: [ - { - content: text, - role: "user" - } - ] - }) - }) - - if (!response.ok || !response?.body) throw new Error("failed to fetch completion") - - return response?.body - } - const zodSchema = jsonToZod(schema) - - if (!zodSchema || zodSchema instanceof Error) throw new Error("failed to parse schema") - - const client = new ZodStream({}) - - const extractionStream = await client.create({ - completionPromise: completion, - response_model: { schema: zodSchema, name: "Extractor" } - }) - - for await (const data of extractionStream) { - setResult(data) - } - } catch (e) { - console.log(e) - } - - setLoading(false) - } - - const submitMessage = async () => { - if (!prompt.length || loading) return - - try { - await startStream({ - url: "/api/ai/chat" - }) - } catch (e) { - console.error(e) - } - } - - return ( -
-
-
-

Example model

-