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

[pull] main from RooVetGit:main #28

Merged
merged 21 commits into from
Feb 6, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
File renamed without changes.
18 changes: 11 additions & 7 deletions .github/workflows/code-qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
branches: [main]

jobs:
qa:
compile:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -21,8 +21,12 @@ jobs:
cache: 'npm'
- name: Install dependencies
run: npm run install:all
- name: Run lint, check types, and esbuild
run: npm run qa
- name: Compile
run: npm run compile
- name: Check types
run: npm run check-types
- name: Lint
run: npm run lint

unit-test:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -66,9 +70,9 @@ jobs:
with:
node-version: '18'
cache: 'npm'
- name: Create env.e2e file
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.e2e
- name: Create env.integration file
run: echo "OPENROUTER_API_KEY=${{ secrets.OPENROUTER_API_KEY }}" > .env.integration
- name: Install dependencies
run: npm run install:all
- name: Run end-to-end tests
run: xvfb-run -a npm run e2e
- name: Run integration tests
run: xvfb-run -a npm run test:integration
9 changes: 8 additions & 1 deletion .github/workflows/marketplace-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,13 @@ jobs:
OVSX_PAT: ${{ secrets.OVSX_PAT }}
run: |
current_package_version=$(node -p "require('./package.json').version")

npm run vsix
package=$(unzip -l bin/roo-cline-${current_package_version}.vsix)
echo "$package"
echo "$package" | grep -q "dist/extension.js" || exit 1
echo "$package" | grep -q "extension/webview-ui/build/assets/index.js" || exit 1
echo "$package" | grep -q "extension/node_modules/@vscode/codicons/dist/codicon.ttf" || exit 1

npm run publish:marketplace
echo "Successfully published version $current_package_version to VS Code Marketplace"

2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ roo-cline-*.vsix
docs/_site/

# Dotenv
.env.e2e
.env.integration
2 changes: 1 addition & 1 deletion .husky/pre-push
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ if [ "$branch" = "main" ]; then
exit 1
fi

npm run qa
npm run compile

# Check for new changesets.
NEW_CHANGESETS=$(find .changeset -name "*.md" ! -name "README.md" | wc -l | tr -d ' ')
Expand Down
4 changes: 2 additions & 2 deletions .vscode-test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import { defineConfig } from '@vscode/test-cli';

export default defineConfig({
label: 'e2e',
files: 'out-e2e/test/**/*.test.js',
label: 'integrationTest',
files: 'out-integration/test/**/*.test.js',
workspaceFolder: '.',
mocha: {
ui: 'tdd',
Expand Down
2 changes: 2 additions & 0 deletions .vscodeignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
# Default
.github/**
.husky/**
.vscode/**
.vscode-test/**
out/**
Expand Down
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Roo Code Changelog

## [3.3.14]

- Should have skipped floor 13 like an elevator. Hopefully this fixes the broken 3.3.13 release by reverting some internal changes to the code structure 🙏

## [3.3.13]

- Ensure the DeepSeek r1 model works with Ollama (thanks @sammcj!)
- First step of a more fundamental fix to the bugs around switching API profiles. If you've been having issues with this please try again and let us know if works any better! More to come soon, including fixing the laggy text entry in provider settings.

## [3.3.12]

- Bug fix to changing a mode's API configuration on the prompts tab
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

42 changes: 19 additions & 23 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "Roo Code (prev. Roo Cline)",
"description": "A VS Code plugin that enhances coding with AI-powered automation, multi-model support, and experimental features.",
"publisher": "RooVeterinaryInc",
"version": "3.3.12",
"version": "3.3.14",
"icon": "assets/icons/rocket.png",
"galleryBanner": {
"color": "#617A91",
Expand Down Expand Up @@ -264,34 +264,30 @@
}
},
"scripts": {
"prepare": "husky",
"install:all": "npm run install:extension && npm run install:webview",
"install:extension": "npm install",
"install:webview": "cd webview-ui && npm install",
"lint": "npm-run-all -l -p lint:*",
"lint:extension": "eslint src --ext ts",
"lint:webview": "cd webview-ui && npm run lint",
"check-types": "npm-run-all -l -p check-types:*",
"check-types:extension": "tsc --noEmit",
"check-types:webview": "cd webview-ui && npm run check-types",
"test": "npm-run-all -l -s test:*",
"test:extension": "jest",
"test:webview": "cd webview-ui && npm run test",
"build": "npm-run-all -l -s build:webview build:extension",
"build:extension": "mkdir -p bin && npx vsce package --out bin",
"build": "npm run build:webview && npm run vsix",
"build:webview": "cd webview-ui && npm run build",
"changeset": "changeset",
"check-types": "tsc --noEmit",
"compile": "tsc -p . --outDir out && node esbuild.js",
"compile:integration": "tsc -p tsconfig.integration.json",
"install:all": "npm install && cd webview-ui && npm install",
"lint": "eslint src --ext ts && npm run lint --prefix webview-ui",
"package": "npm run build:webview && npm run check-types && npm run lint && node esbuild.js --production",
"pretest": "npm run compile && npm run compile:integration",
"dev": "cd webview-ui && npm run dev",
"qa": "npm-run-all -l -p lint check-types && node esbuild.js",
"e2e": "npm run build && tsc -p tsconfig.e2e.json && npx dotenvx run -f .env.e2e -- vscode-test",
"test": "jest && npm run test:webview",
"test:webview": "cd webview-ui && npm run test",
"test:integration": "npm run build && npm run compile:integration && npx dotenvx run -f .env.integration -- vscode-test",
"prepare": "husky",
"publish:marketplace": "vsce publish && ovsx publish",
"publish": "npm run build && changeset publish && npm install --package-lock-only",
"version-packages": "changeset version && npm install --package-lock-only",
"vscode:prepublish": "npm run package",
"vsix": "mkdir -p bin && npx vsce package --out bin",
"watch": "npm-run-all -p watch:*",
"watch:esbuild": "node esbuild.js --watch",
"watch:tsc": "tsc --noEmit --watch --project tsconfig.json",
"package": "npm-run-all -l -p lint check-types && node esbuild.js --production",
"changeset": "changeset",
"version-packages": "changeset version && npm install --package-lock-only",
"publish": "npm run build && changeset publish && npm install --package-lock-only",
"publish:marketplace": "vsce publish && ovsx publish"
"watch-tests": "tsc -p . -w --outDir out"
},
"dependencies": {
"@anthropic-ai/bedrock-sdk": "^0.10.2",
Expand Down
16 changes: 13 additions & 3 deletions src/api/providers/openai.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,20 @@ export class OpenAiHandler implements ApiHandler, SingleCompletionHandler {

constructor(options: ApiHandlerOptions) {
this.options = options
// Azure API shape slightly differs from the core API shape:
// https://github.com/openai/openai-node?tab=readme-ov-file#microsoft-azure-openai
const urlHost = new URL(this.options.openAiBaseUrl ?? "").host

let urlHost: string

try {
urlHost = new URL(this.options.openAiBaseUrl ?? "").host
} catch (error) {
// Likely an invalid `openAiBaseUrl`; we're still working on
// proper settings validation.
urlHost = ""
}

if (urlHost === "azure.com" || urlHost.endsWith(".azure.com") || options.openAiUseAzure) {
// Azure API shape slightly differs from the core API shape:
// https://github.com/openai/openai-node?tab=readme-ov-file#microsoft-azure-openai
this.client = new AzureOpenAI({
baseURL: this.options.openAiBaseUrl,
apiKey: this.options.openAiApiKey,
Expand Down
4 changes: 2 additions & 2 deletions tsconfig.e2e.json → tsconfig.integration.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"skipLibCheck": true,
"useUnknownInCatchVariables": false,
"rootDir": "src",
"outDir": "out-e2e"
"outDir": "out-integration"
},
"include": ["**/*.ts"],
"exclude": [".vscode-test", "benchmark", "dist", "**/node_modules/**", "out", "out-e2e", "webview-ui"]
"exclude": [".vscode-test", "benchmark", "dist", "**/node_modules/**", "out", "out-integration", "webview-ui"]
}
Loading