Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Contributing #114

Merged
merged 1 commit into from
Feb 15, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ playground/ # NextJS app for testing changes in real-time

# For documentation
pnpm dev:docs

# For playground
pnpm dev:playground
```

Note: The development mode includes automatic rebuilding on code changes, so you don't need to run `pnpm build` manually after each change.
Expand Down Expand Up @@ -80,9 +83,16 @@ playground/ # NextJS app for testing changes in real-time
We provide a playground environment to test your changes in real-time:

- The `playground/` directory contains a NextJS app that automatically reflects changes made to the packages
- Before starting the playground, create a `.env.local` file in the `playground/` directory and add your OpenAI API key:
```
OPENAI_API_KEY=your_api_key_here
```
- Run `pnpm dev:playground` to start the playground application
- When you run `pnpm dev:monacopilot` or `pnpm dev:core`, your changes will be immediately visible in the playground
- Use this playground to verify your changes and test functionality before submitting a PR

## Running Tests

To run tests:

```bash
Expand Down
3 changes: 0 additions & 3 deletions docs/configuration/register-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -136,9 +136,6 @@ registerCompletion(monaco, editor, {
});
```

> [!NOTE]
> If you're using `groq` as your provider, it's recommended to set `maxContextLines` to `60` or less due to its low rate limits and lack of pay-as-you-go pricing. However, Groq is expected to offer pay-as-you-go pricing in the near future.

## Caching Completions

Monacopilot caches completions by default. It uses a FIFO (First In First Out) strategy, reusing cached completions when the context and cursor position match while editing (default: `true`). To disable caching:
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/constants.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export const DEFAULT_COPILOT_TEMPERATURE = 0.1 as const;
export const DEFAULT_COPILOT_MAX_TOKENS = 500 as const;
export const DEFAULT_COPILOT_MAX_TOKENS = 64 as const;
3 changes: 0 additions & 3 deletions packages/monacopilot/src/types/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ export interface RegisterCompletionOptions {
* The maximum number of lines of code to include in the completion request.
* This limits the request size to the model to prevent `429 Too Many Requests` errors
* and reduce costs for long code.
*
* It is recommended to set `maxContextLines` to `60` or less if you are using `Groq` as your provider,
* since `Groq` does not implement pay-as-you-go pricing and has only low rate limits.
*/
maxContextLines?: number;
/**
Expand Down