Skip to content

Commit 835d4eb

Browse files
Merge branch 'main' into current-file
2 parents 45a98c3 + a1bfef9 commit 835d4eb

File tree

200 files changed

+7001
-3589
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+7001
-3589
lines changed

.continue/rules/colors.yaml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: GUI
2+
version: 0.0.1
3+
schema: v1
4+
rules:
5+
- name: Extension Color Themes
6+
rule: |
7+
When adding colors to components, use tailwind color classes.
8+
Do NOT use explicit colors like text-gray-400. Instead, use theme colors.
9+
10+
The common available theme colors are:
11+
- For normal text: foreground, description, description-muted
12+
- For other text, icons, etc: success, warning, error, accent, link
13+
- For general components background, border, border-focus
14+
- For specific components:
15+
- Button: primary, primary-foreground, primary-hover, secondary, secondary-foreground, secondary-hover
16+
- Input: input, input-foreground, input-border, input-placeholder
17+
- Badge: badge, badge-foreground
18+
- List/Dropdown items: list-hover, list-active, list-active-foreground
19+
- Code Editor: editor, editor-foreground
20+
21+
Any of these colors can be used in tailwind e.g. bg-primary, text-success, border-error, hover:bg-list-hover, etc.
22+
globs: "gui/**/*.tsx"
23+
# Excluding the following less-used colors:
24+
# Command (only used by tip-tap): command, command-foreground, command-border, command-border-focus
25+
# Find widget colors: find-match, find-match-selected
26+
# table-oddRow
27+

.github/workflows/metrics.yaml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
name: Monthly issue metrics
2+
on:
3+
workflow_dispatch:
4+
schedule:
5+
# Runs every Monday at 9:00 AM PST (17:00 UTC)
6+
- cron: "0 17 * * 1"
7+
8+
push:
9+
branches:
10+
- nate/metrics-action
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
build:
17+
name: issue metrics
18+
runs-on: ubuntu-latest
19+
permissions:
20+
issues: write
21+
pull-requests: read
22+
steps:
23+
- name: Get dates for last month
24+
shell: bash
25+
run: |
26+
# Calculate the first day of the previous month
27+
first_day=$(date -d "last month" +%Y-%m-01)
28+
29+
# Calculate the last day of the previous month
30+
last_day=$(date -d "$first_day +1 month -1 day" +%Y-%m-%d)
31+
32+
#Set an environment variable with the date range
33+
echo "$first_day..$last_day"
34+
echo "last_month=$first_day..$last_day" >> "$GITHUB_ENV"
35+
36+
- name: Run issue-metrics tool
37+
uses: github/issue-metrics@v3
38+
env:
39+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
40+
SEARCH_QUERY: 'repo:continuedev/continue created:${{ env.last_month }} -reason:"not planned"'
41+
42+
- name: Read metrics file content
43+
id: read-metrics
44+
run: |
45+
content=$(cat ./issue_metrics.md)
46+
# This prepares the content in a way that can be used in GitHub Actions
47+
content="${content//'%'/'%25'}"
48+
content="${content//$'\n'/'%0A'}"
49+
# content="${content//$'\r'/'%0D'}"
50+
echo "metrics_content=$content" >> "$GITHUB_OUTPUT"
51+
52+
- name: Post a message in a channel
53+
uses: slackapi/[email protected]
54+
with:
55+
webhook: ${{ secrets.ISSUE_PR_METRICS_SLACK_WEBHOOK_URL }}
56+
webhook-type: incoming-webhook
57+
payload: |
58+
text: "Issue / PR Metrics Report"
59+
blocks:
60+
- type: "header"
61+
text:
62+
type: "plain_text"
63+
text: "Monthly Issue Metrics Report"
64+
emoji: true
65+
- type: "section"
66+
text:
67+
type: "mrkdwn"
68+
text: |
69+
${{ steps.read-metrics.outputs.metrics_content }}
70+
71+
- name: Upload metrics report as artifact
72+
uses: actions/upload-artifact@v4
73+
with:
74+
name: issue-metrics-report
75+
path: ./issue_metrics.md

CONTRIBUTING.md

Lines changed: 59 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,36 @@
33
## Table of Contents
44

55
- [Contributing to Continue](#contributing-to-continue)
6-
- [Table of Contents](#table-of-contents)
6+
- [Table of Contents](#table-of-contents)
77
- [❤️ Ways to Contribute](#️-ways-to-contribute)
8-
- [👋 Continue Contribution Ideas](#-continue-contribution-ideas)
9-
- [🐛 Report Bugs](#-report-bugs)
10-
- [✨ Suggest Enhancements](#-suggest-enhancements)
11-
- [📖 Updating / Improving Documentation](#-updating--improving-documentation)
12-
- [Running the Documentation Server Locally](#running-the-documentation-server-locally)
13-
- [Method 1: NPM Script](#method-1-npm-script)
14-
- [Method 2: VS Code Task](#method-2-vs-code-task)
15-
- [🧑‍💻 Contributing Code](#-contributing-code)
16-
- [Environment Setup](#environment-setup)
17-
- [Pre-requisites](#pre-requisites)
18-
- [Fork the Continue Repository](#fork-the-continue-repository)
19-
- [VS Code](#vs-code)
20-
- [Debugging](#debugging)
21-
- [JetBrains](#jetbrains)
22-
- [Our Git Workflow](#our-git-workflow)
23-
- [Development workflow](#development-workflow)
24-
- [Formatting](#formatting)
25-
- [Testing](#testing)
26-
- [Review Process](#review-process)
27-
- [Getting help](#getting-help)
28-
- [Contribtuing new LLM Providers/Models](#contribtuing-new-llm-providersmodels)
29-
- [Adding an LLM Provider](#adding-an-llm-provider)
30-
- [Adding Models](#adding-models)
31-
- [📐 Continue Architecture](#-continue-architecture)
32-
- [Continue VS Code Extension](#continue-vs-code-extension)
33-
- [Continue JetBrains Extension](#continue-jetbrains-extension)
34-
- [Contibutor License Agreement](#contributor-license-agreement-cla)
8+
- [👋 Continue Contribution Ideas](#-continue-contribution-ideas)
9+
- [🐛 Report Bugs](#-report-bugs)
10+
- [✨ Suggest Enhancements](#-suggest-enhancements)
11+
- [📖 Updating / Improving Documentation](#-updating--improving-documentation)
12+
- [Running the Documentation Server Locally](#running-the-documentation-server-locally)
13+
- [Method 1: NPM Script](#method-1-npm-script)
14+
- [Method 2: VS Code Task](#method-2-vs-code-task)
15+
- [🧑‍💻 Contributing Code](#-contributing-code)
16+
- [Environment Setup](#environment-setup)
17+
- [Pre-requisites](#pre-requisites)
18+
- [Fork the Continue Repository](#fork-the-continue-repository)
19+
- [VS Code](#vs-code)
20+
- [Debugging](#debugging)
21+
- [JetBrains](#jetbrains)
22+
- [Our Git Workflow](#our-git-workflow)
23+
- [Development workflow](#development-workflow)
24+
- [Formatting](#formatting)
25+
- [Theme Colors](#theme-colors)
26+
- [Testing](#testing)
27+
- [Review Process](#review-process)
28+
- [Getting help](#getting-help)
29+
- [Contribtuing new LLM Providers/Models](#contribtuing-new-llm-providersmodels)
30+
- [Adding an LLM Provider](#adding-an-llm-provider)
31+
- [Adding Models](#adding-models)
32+
- [📐 Continue Architecture](#-continue-architecture)
33+
- [Continue VS Code Extension](#continue-vs-code-extension)
34+
- [Continue JetBrains Extension](#continue-jetbrains-extension)
35+
- [Contibutor License Agreement](#contributor-license-agreement-cla)
3536

3637
# ❤️ Ways to Contribute
3738

@@ -60,9 +61,9 @@ an enhancement are:
6061

6162
- Create an issue
6263

63-
- First, check whether a similar proposal has already been made
64-
- If not, [create an issue](https://github.com/continuedev/continue/issues)
65-
- Please describe the enhancement in as much detail as you can, and why it would be useful
64+
- First, check whether a similar proposal has already been made
65+
- If not, [create an issue](https://github.com/continuedev/continue/issues)
66+
- Please describe the enhancement in as much detail as you can, and why it would be useful
6667

6768
- Join the [Continue Discord](https://discord.gg/NWtdYexhMs) and tell us about your idea in the `#feedback` channel
6869

@@ -140,12 +141,12 @@ nvm use
140141

141142
2. Start debugging:
142143

143-
1. Switch to Run and Debug view
144-
2. Select `Launch extension` from drop down
145-
3. Hit play button
146-
4. This will start the extension in debug mode and open a new VS Code window with it installed
147-
1. The new VS Code window with the extension is referred to as the _Host VS Code_
148-
2. The window you started debugging from is referred to as the _Main VS Code_
144+
1. Switch to Run and Debug view
145+
2. Select `Launch extension` from drop down
146+
3. Hit play button
147+
4. This will start the extension in debug mode and open a new VS Code window with it installed
148+
1. The new VS Code window with the extension is referred to as the _Host VS Code_
149+
2. The window you started debugging from is referred to as the _Main VS Code_
149150

150151
3. To package the extension, run `npm run package` in the `extensions/vscode` directory, select `Tasks: Run Task` and
151152
then select `vscode-extension:package`. This will generate `extensions/vscode/build/continue-{VERSION}.vsix`, which
@@ -192,6 +193,22 @@ To keep the Continue codebase clean and maintainable, we expect the following fr
192193
Continue uses [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) to format
193194
JavaScript/TypeScript. Please install the Prettier extension in VS Code and enable "Format on Save" in your settings.
194195

196+
### Theme Colors
197+
198+
Continue has a set of named theme colors that we map to extension colors and tailwind classes, which can be found in [gui/src/styles/theme.ts](gui/src/styles/theme.ts)
199+
200+
Guidelines for using theme colors:
201+
202+
- Use Tailwind colors whenever possible. If developing in VS Code, download the [Tailwind CSS Intellisense extension](https://marketplace.visualstudio.com/items?itemName=bradlc.vscode-tailwindcss) for great suggestions
203+
- Avoid using any explicit classes and CSS variables outside the theme (e.g. `text-yellow-400`)
204+
205+
Guidelines for adding/updating theme colors:
206+
207+
- Choose sensible VS Code variables to add/update in [gui/src/styles/theme.ts](gui/src/styles/theme.ts) (see [here](https://code.visualstudio.com/api/references/theme-color) and [here](https://www.notion.so/1fa1d55165f78097b551e3bc296fcf76?pvs=25) for inspiration)
208+
- Choose sensible Jetbrains named colors to add/update in `GetTheme.kt` (flagship LLMs can give you good suggestions to try)
209+
- Update `tailwind.config.js` if needed
210+
- Use the Theme Test Page to check colors. This can be accessed by going to `Settings` -> `Help` -> `Theme Test Page` in dev/debug mode.
211+
195212
### Testing
196213

197214
We have a mix of unit, functional, and e2e test suites, with a primary focus on functional testing. These tests run on
@@ -239,10 +256,10 @@ model:
239256

240257
- [AddNewModel page](./gui/src/pages/AddNewModel/configs/) - This directory defines which model options are shown in the
241258
side bar model selection UI. To add a new model:
242-
1. Add a `ModelPackage` entry for the model into [configs/models.ts](./gui/src/pages/AddNewModel/configs/models.ts),
243-
following the lead of the many examples near the top of the file
244-
2. Add the model within its provider's array
245-
to [configs/providers.ts](./gui/src/pages/AddNewModel/configs/providers.ts) (add provider if needed)
259+
1. Add a `ModelPackage` entry for the model into [configs/models.ts](./gui/src/pages/AddNewModel/configs/models.ts),
260+
following the lead of the many examples near the top of the file
261+
2. Add the model within its provider's array
262+
to [configs/providers.ts](./gui/src/pages/AddNewModel/configs/providers.ts) (add provider if needed)
246263
- LLM Providers: Since many providers use their own custom strings to identify models, you'll have to add the
247264
translation from Continue's model name (the one you added to `index.d.ts`) and the model string for each of these
248265
providers: [Ollama](./core/llm/llms/Ollama.ts), [Together](./core/llm/llms/Together.ts),
@@ -264,4 +281,4 @@ We require all contributors to accept the CLA and have made it as easy as commen
264281
I have read the CLA Document and I hereby sign the CLA
265282
```
266283

267-
3. The CLA‑Assistant bot records your signature in the repo and marks the status check as passed.
284+
3. The CLA‑Assistant bot records your signature in the repo and marks the status check as passed.

binary/package-lock.json

Lines changed: 8 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

binary/test/binary.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ describe("Test Suite", () => {
226226
title: "Test Model",
227227
provider: "openai",
228228
model: "gpt-3.5-turbo",
229+
underlyingProviderName: "openai",
229230
};
230231
await messenger.request("config/addModel", {
231232
model,
@@ -252,6 +253,7 @@ describe("Test Suite", () => {
252253
title: "Test Model",
253254
provider: "mock",
254255
model: "gpt-3.5-turbo",
256+
underlyingProviderName: "mock",
255257
};
256258
await messenger.request("config/addModel", {
257259
model,

core/autocomplete/CompletionProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ export class CompletionProvider {
244244
prefix,
245245
suffix,
246246
prompt,
247-
modelProvider: llm.providerName,
247+
modelProvider: llm.underlyingProviderName,
248248
modelName: llm.model,
249249
completionOptions,
250250
cacheHit,

core/commands/slash/http.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1+
import { streamResponse } from "@continuedev/fetch";
12
import { SlashCommand } from "../../index.js";
23
import { removeQuotesAndEscapes } from "../../util/index.js";
3-
import { streamResponse } from "../../llm/stream.js";
44

55
const HttpSlashCommand: SlashCommand = {
66
name: "http",

core/config/load.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ async function intermediateToFinalConfig({
627627
function llmToSerializedModelDescription(llm: ILLM): ModelDescription {
628628
return {
629629
provider: llm.providerName,
630+
underlyingProviderName: llm.underlyingProviderName,
630631
model: llm.model,
631632
title: llm.title ?? llm.model,
632633
apiKey: llm.apiKey,

core/config/markdown/parseMarkdownRule.test.ts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,42 @@ This is a test rule without a heading.`;
151151
);
152152
expect(result.name).toBe("custom-rule");
153153
});
154+
155+
it("should include description from frontmatter", () => {
156+
const content = `---
157+
globs: "**/test/**/*.kt"
158+
name: Test Rule
159+
description: This is a rule description from frontmatter
160+
---
161+
162+
# Test Rule
163+
164+
This is the content of the rule.`;
165+
166+
const result = convertMarkdownRuleToContinueRule(
167+
"/path/to/rule.md",
168+
content,
169+
);
170+
expect(result.description).toBe(
171+
"This is a rule description from frontmatter",
172+
);
173+
});
174+
175+
it("should include `alwaysApply` from frontmatter", () => {
176+
const content = `---
177+
globs: "**/test/**/*.kt"
178+
name: Test Rule
179+
alwaysApply: false
180+
---
181+
182+
# Test Rule
183+
184+
This is a rule with alwaysApply explicitly set to false.`;
185+
186+
const result = convertMarkdownRuleToContinueRule(
187+
"/path/to/rule.md",
188+
content,
189+
);
190+
expect(result.alwaysApply).toBe(false);
191+
});
154192
});

0 commit comments

Comments
 (0)