Skip to content

Commit

Permalink
v0.2 turbo refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ataibarkai committed Jul 13, 2023
1 parent 6b8366b commit 03164e9
Show file tree
Hide file tree
Showing 197 changed files with 5,501 additions and 7,108 deletions.
9 changes: 3 additions & 6 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/config@2.2.0/schema.json",
"$schema": "https://unpkg.com/@changesets/config@2.3.1/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": [
"next-langchain",
"next-openai"
]
"ignore": []
}
12 changes: 6 additions & 6 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
module.exports = {
root: true,
// This tells ESLint to load the config from the package `eslint-config-copilotkit`
extends: ['recursivelyai-copilotkit'],
// This tells ESLint to load the config from the package `eslint-config-custom`
extends: ["custom"],
settings: {
next: {
rootDir: ['apps/*/']
}
}
}
rootDir: ["apps/*/"],
},
},
};
45 changes: 34 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,13 +1,36 @@
.DS_Store
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
node_modules
.pnp
.pnp.js

# testing
coverage

# next.js
.next/
out/
build
.swc/

# misc
.DS_Store
*.pem

# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# local env files
.env.local
.env.development.local
.env.test.local
.env.production.local

# turbo
.turbo
*.log
.next
dist
dist-ssr
*.local
.env
.cache
server/dist
public/dist
.turbo

# ui
dist/
4 changes: 0 additions & 4 deletions .prettierignore

This file was deleted.

36 changes: 0 additions & 36 deletions .vscode/launch.json

This file was deleted.

1 change: 0 additions & 1 deletion README.md

This file was deleted.

42 changes: 42 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
![CopilotKit Banner](./assets/banner.png)

# CopilotKit

Add a powerful & customizable copilot to any app, in an afternoon.

## Installation

```bash
pnpm install @copilotkit/react-core @copilotkit/react-ui
```

## Example

You can Bring Your Own UI, but it's easy to get started with one of the built-in UIs:

```typescript
import { Copilot } from "copilotkit";

// Create a new AI-powered copilot instance
const myCopilot = new Copilot();

// Use your copilot in your application
myCopilot.interact("Hello World");
```

> Note: Please refer to our [API Documentation](link-to-your-api-documentation) for more detailed information.
## Key entrypoints:

- `useMakeCopilotReadable`: give static information to the copilot, in sync with on-screen state
- `useMakeCopilotActionable`: allow the copilot to control the state of the application

## Demo

The following GIF showcases CopilotKit in action.

![Demo Gif](path-to-your-demo-gif)

## Contribute

Your contributions are always welcome! Please have a look at the [contribution guidelines](link-to-your-contribution-guidelines) first. 🎉
4 changes: 4 additions & 0 deletions apps/docs/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ["custom"],
};
9 changes: 4 additions & 5 deletions examples/next-openai/.gitignore → apps/docs/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
28 changes: 28 additions & 0 deletions apps/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# docs

## 1.1.0

### Minor Changes

- working version
- 9d2f3cb: semi compiling

### Patch Changes

- Updated dependencies
- Updated dependencies [9d2f3cb]
- @copilotkit/react-ui@0.3.0

## 1.0.2

### Patch Changes

- Updated dependencies
- @copilotkit/react-ui@0.2.0

## 1.0.1

### Patch Changes

- Updated dependencies
- ui@0.1.0
30 changes: 30 additions & 0 deletions apps/docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
## Getting Started

First, run the development server:

```bash
yarn dev
```

Open [http://localhost:3001](http://localhost:3001) with your browser to see the result.

You can start editing the page by modifying `pages/index.js`. The page auto-updates as you edit the file.

[API routes](https://nextjs.org/docs/api-routes/introduction) can be accessed on [http://localhost:3001/api/hello](http://localhost:3001/api/hello). This endpoint can be edited in `pages/api/hello.js`.

The `pages/api` directory is mapped to `/api/*`. Files in this directory are treated as [API routes](https://nextjs.org/docs/api-routes/introduction) instead of React pages.

## Learn More

To learn more about Next.js, take a look at the following resources:

- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API.
- [Learn Next.js](https://nextjs.org/learn/foundations/about-nextjs) - an interactive Next.js tutorial.

You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js/) - your feedback and contributions are welcome!

## Deploy on Vercel

The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_source=github.com&utm_medium=referral&utm_campaign=turborepo-readme) from the creators of Next.js.

Check out our [Next.js deployment documentation](https://nextjs.org/docs/deployment) for more details.
5 changes: 5 additions & 0 deletions apps/docs/next-env.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
/// <reference types="next" />
/// <reference types="next/image-types/global" />

// NOTE: This file should not be edited
// see https://nextjs.org/docs/basic-features/typescript for more information.
3 changes: 3 additions & 0 deletions apps/docs/next.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
reactStrictMode: true,
};
30 changes: 30 additions & 0 deletions apps/docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"name": "docs",
"version": "1.1.0",
"private": true,
"scripts": {
"dev": "next dev --port 3001",
"build": "next build",
"start": "next start",
"lint": "next lint",
"clean": "rm -rf .turbo && rm -rf node_modules && rm -rf dist && rm -rf .next"
},
"dependencies": {
"next": "^13.4.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"@copilotkit/react-ui": "workspace:*"
},
"devDependencies": {
"@types/node": "^18.11.17",
"@types/react": "^18.2.5",
"@types/react-dom": "^18.2.4",
"autoprefixer": "^10.4.13",
"eslint-config-custom": "workspace:*",
"postcss": "^8.4.20",
"tailwind-config": "workspace:*",
"tailwindcss": "^3.2.4",
"tsconfig": "workspace:*",
"typescript": "^4.9.4"
}
}
9 changes: 9 additions & 0 deletions apps/docs/postcss.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// If you want to use other PostCSS plugins, see the following:
// https://tailwindcss.com/docs/using-with-preprocessors

module.exports = {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
15 changes: 15 additions & 0 deletions apps/docs/src/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import "../styles/globals.css";
// include styles from the ui package
import "@copilotkit/react-ui/styles.css";

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en" className="bg-zinc-900">
<body>{children}</body>
</html>
);
}
22 changes: 22 additions & 0 deletions apps/docs/src/app/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import { Metadata } from "next";
import Head from "next/head";

export const metadata: Metadata = {
title: "Docs - Turborepo Example",
};

export default function Home() {
return (
<div className="flex min-h-screen flex-col items-center justify-center py-2">
<main className="mx-auto w-auto px-4 pt-16 pb-8 sm:pt-24 lg:px-8">
<h1 className="mx-auto text-center text-6xl font-extrabold tracking-tight text-white sm:text-7xl lg:text-8xl xl:text-8xl">
Docs
<span className="block bg-gradient-to-r from-brandred to-brandblue bg-clip-text text-transparent px-2">
Turborepo Example
</span>
</h1>
<div className="mx-auto mt-5 max-w-xl sm:flex sm:justify-center md:mt-8"></div>
</main>
</div>
);
}
File renamed without changes.
7 changes: 7 additions & 0 deletions apps/docs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
// tailwind config is required for editor support

const sharedConfig = require("tailwind-config/tailwind.config.js");

module.exports = {
presets: [sharedConfig],
};
8 changes: 8 additions & 0 deletions apps/docs/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"extends": "tsconfig/nextjs.json",
"compilerOptions": {
"plugins": [{ "name": "next" }]
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
File renamed without changes.
4 changes: 4 additions & 0 deletions apps/web/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
module.exports = {
root: true,
extends: ["custom"],
};
9 changes: 4 additions & 5 deletions examples/next-langchain/.gitignore → apps/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,10 @@ yarn-debug.log*
yarn-error.log*

# local env files
.env*.local
.env.local
.env.development.local
.env.test.local
.env.production.local

# vercel
.vercel

# typescript
*.tsbuildinfo
next-env.d.ts
Loading

0 comments on commit 03164e9

Please sign in to comment.