Skip to content
This repository was archived by the owner on May 12, 2026. It is now read-only.
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
6 changes: 0 additions & 6 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,3 @@ jobs:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

- name: Notify to Discord
run: |
curl -X POST ${{ secrets.DISCORD_WEBHOOK_URL }} \
-H "Content-Type: application/json" \
-d '{"msg":"VSCode plugin ${{ steps.setupvars.outputs.plugin_version }} is released in ${{ steps.setupvars.outputs.slack_notification_channel }} channel"}'
26 changes: 6 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

---

[![Discord](https://img.shields.io/discord/1037660742440194089?logo=discord&label=Discord&link=https%3A%2F%2Fsmallcloud.ai%2Fdiscord)](https://smallcloud.ai/discord)
[![Twitter Follow](https://img.shields.io/twitter/follow/refact_ai)](https://twitter.com/intent/follow?screen_name=refact_ai)
![License](https://img.shields.io/github/license/smallcloudai/refact-vscode)

Expand All @@ -13,9 +12,8 @@
Refact.ai is the #1 free **open-source** AI Agent on the SWE-bench verified leaderboard. It autonomously handles software engineering tasks end to end. It deeply understands large and complex codebases and integrates with developers’ tools (including MCP), databases, and browsers to automate complex, multi-step tasks.

- Integrate the AI Agent with the tools you already use, allowing it to complete tasks end to end while transparently showing every step it takes.
- Deploy Refact.ai on-premise to maintain **100% control over your codebase**.
- Access state-of-the-art models like Claude 4 Sonnet, GPT-4.1, 4o, Gemini 2.5 Pro, and more.
- Bring your own key (BYOK) - Use your own API keys for external LLMs.
- Bring your own key (BYOK) or connect local providers.
- Stop switching between your IDE and chat—Refact.ai has an integrated chat right in your IDE.
- Get free, unlimited, context-aware auto-completion.

Expand All @@ -39,23 +37,11 @@ We can't say it better than our users: *'Refact.ai understands me better than my
- **@tree** - display the workspace directory and files tree.
- Create your own **custom system prompt** for a more personalized workflow.![@-commands](https://github.com/user-attachments/assets/28e1db76-3490-4195-a3e0-de30496239a9)

## Refact.ai Agent For Enterprise
Deploying Refact.ai Agent is like adding a 24/7 engineer to your team—one that instantly understands your codebase, adapts to your workflows, accelerates development from day one, and becomes a shared knowledge base for your entire team.
## BYOK/local-only setup

1. **Refact.ai already understands your company's context:** AI Agent captures the unique structure, tools, and workflows of your organization, using your company's databases, documentation, and code architecture to deliver customized solutions.
2. **Gets smarter over time:** With each interaction and feedback, Refact.ai Agent adapts to your organization's needs, becoming more accurate and powerful.
3. **Organizes experience into the knowledge base:** Refact.ai Agent captures and shares knowledge from interactions with each team member. It not only streamlines workflows but also supports faster onboarding and smoother cross-functional collaboration across projects.
Refact runs with BYOK or local model providers configured on your machine.
Open the Refact sidebar, configure at least one provider in Provider Setup, then choose default models.

### Take full control of your AI Agent, tailored to your company:
- **Deploy Refact.ai on-premise:** on your own servers or private cloud. Your data never leaves your control. Telemetry from the plugins goes to your server and nowhere else. You can verify what the code does, it's open source.
- **Fine-tune a model on your codebase:** A fine-tuned code completion model will provide you with more relevant suggestions: it can memorize your coding style, the right way to use your internal APIs, and the tech stack you use.
- **Priority Support:** Our engineers are always available to assist you at every stage, from setup to fine-tuning and beyond.

**To get a 2-week free trial** for your team, just fill out the form on [our website](https://refact.ai/contact/?utm_source=vscode&utm_medium=marketplace&utm_campaign=enterprise). We'll reach out with more details!
\
 
\
 
## Which tasks can Refact.ai help me with?

- **Generate code from natural language prompts (even if you make typos)** - Instantly turn ideas into functional code, accelerating development and eliminating the blank-screen problem.
Expand Down Expand Up @@ -93,6 +79,6 @@ Deploying Refact.ai Agent is like adding a 24/7 engineer to your team—one that
- **Create Documentation** - Automate documentation generation to keep knowledge accessible and up to date.
- **Generate Docstrings** - Enhance maintainability with clear, structured documentation generated for functions and classes in seconds.

## Join Our Discord Community
## Support & Feedback

Connect with other developers in our [Discord community](https://www.smallcloud.ai/discord). Ask questions, share your opinion, propose new features.
Use GitHub issues or discussions to ask questions, report bugs, or propose features.
63 changes: 5 additions & 58 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"url": "https://github.com/smallcloudai/refact-vscode/issues",
"email": "support@smallcloud.tech"
},
"version": "7.0.2",
"version": "8.0.1",
"dependencies": {
"@types/marked": "^4.0.8",
"@types/vscode": "^1.69.0",
Expand All @@ -27,7 +27,7 @@
"fetch-h2": "^3.0.2",
"json5": "^2.2.3",
"marked": "^4.0.8",
"refact-chat-js": "^7.0.2",
"refact-chat-js": "^8.0.0",
"uuid": "^9.0.1",
"vscode-languageclient": "^7.0.0"
},
Expand All @@ -46,7 +46,7 @@
"glob": "^8.0.3",
"mocha": "^10.0.0",
"patch-package": "^8.0.0",
"typescript": "^4.7.4"
"typescript": "^5.0.0"
},
"engines": {
"vscode": "^1.69.0"
Expand Down Expand Up @@ -128,28 +128,6 @@
"type": "object",
"title": "Refact Assistant",
"properties": {
"refactai.addressURL": {
"type": "string",
"description": "For Enterprise, put there your company's server address. Your admin should have emailed that to you.\nFor self-hosted, use something like http://127.0.0.1:8008/\nFor inference in public cloud, use \"Refact\" or \"HF\".",
"default": "",
"order": 0
},
"refactai.infurl": {
"type": "string",
"deprecationMessage": "The new field is called addressURL. It's about the same, but it has special values like \"HF\" and if it's empty, makes the plugin do nothing, which is better for Enterprise use case to prevent leaks.",
"order": 0
},
"refactai.apiKey": {
"type": "string",
"default": "",
"description": "Secret API Key. It's used to authenticate your requests.",
"order": 1
},
"codify.apiKey": {
"type": "string",
"deprecationMessage": "Use refactai.apiKey instead.",
"order": 1
},
"refactai.insecureSSL": {
"type": "boolean",
"description": "Allow insecure server connections when using SSL, ignore certificate verification errors. Allows you to use self-signed certificates.",
Expand Down Expand Up @@ -195,7 +173,7 @@
},
"refactai.ast": {
"type": "boolean",
"markdownDescription": "Enable context-aware code completion and chat, adds defintion() and references() functions for a chat model, and @definition, @references commands for you to add context manually.\n\nRAG works better with a larger context, available in the [Pro plan](https://refact.ai/pricing/?utm_source=vscode&utm_medium=settings&utm_campaign=plugin) and [for companies](https://refact.ai/enterprise/?utm_source=vscode&utm_medium=settings&utm_campaign=plugin).",
"markdownDescription": "Enable context-aware code completion and chat. This adds definition() and references() functions for chat models, plus @definition and @references commands for adding context manually.",
"default": true,
"order": 8
},
Expand All @@ -207,7 +185,7 @@
},
"refactai.vecdb": {
"type": "boolean",
"markdownDescription": "Enable vector database. This adds the ability for a chat model to perform a semantic search in your codebase, and the @workspace command for you to add context manually.\n\nRAG performs better with a larger context, available in the [Pro plan](https://refact.ai/pricing/?utm_source=vscode&utm_medium=settings&utm_campaign=plugin) and [for companies](https://refact.ai/enterprise/?utm_source=vscode&utm_medium=settings&utm_campaign=plugin).",
"markdownDescription": "Enable vector database. This adds semantic search over your codebase and the @workspace command for adding context manually.",
"default": true,
"order": 11
},
Expand All @@ -227,16 +205,6 @@
"description": "Enable experimental features.",
"default": false,
"order": 14
},
"refactai.activeGroup": {
"type": [
"object",
"null"
],
"default": null,
"description": "Active selected group in your Team Workspace. Modify via settings.json in your workspace",
"scope": "machine-overridable",
"included": false
}
}
},
Expand All @@ -251,21 +219,11 @@
"command": "refactaicmd.closeInlineChat",
"title": "Close"
},
{
"command": "refactaicmd.activateToolboxDeprecated",
"title": "Activate Toolbox (deprecated)",
"category": "Refact.ai"
},
{
"command": "refactaicmd.activateToolbox",
"title": "Activate (opens chat)",
"category": "Refact.ai"
},
{
"command": "refactaicmd.login",
"title": "Login",
"category": "Refact.ai"
},
{
"command": "refactaicmd.completionManual",
"title": "Manual Completion Trigger",
Expand Down Expand Up @@ -313,10 +271,6 @@
]
},
"keybindings": [
{
"command": "refactaicmd.activateToolboxDeprecated",
"key": "alt+t"
},
{
"command": "refactaicmd.completionManual",
"key": "alt+space"
Expand Down Expand Up @@ -390,13 +344,6 @@
"fontCharacter": "\\e807"
}
},
"codify-coin": {
"description": "codify coin",
"default": {
"fontPath": "./assets/codify.woff",
"fontCharacter": "\\e802"
}
},
"codify-chat": {
"description": "codify chat",
"default": {
Expand Down
34 changes: 22 additions & 12 deletions src/chatTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,6 +910,27 @@ export class ChatTab {

const fontSize = vscode.workspace.getConfiguration().get<number>("editor.fontSize") ?? 12;
const scaling = fontSize < 14 ? "90%" : "100%";
const rawPort = global.rust_binary_blob?.get_port();
const port = typeof rawPort === "number" && Number.isFinite(rawPort) && rawPort > 0
? rawPort
: 0;
const config = {
host: "vscode",
tabbed: isTab,
themeProps: {
accentColor: "gray",
scaling,
},
features: {
vecdb,
ast,
},
lspPort: port,
};
const serializedConfig = JSON.stringify(config).replace(
/<\/script>/gi,
"</scr\"+\"ipt>"
);

const nonce = ChatTab.getNonce();
return `<!DOCTYPE html>
Expand Down Expand Up @@ -938,18 +959,7 @@ export class ChatTab {
<script nonce="${nonce}">
window.onload = function() {
const root = document.getElementById("refact-chat")
RefactChat.render(root, {
host: "vscode",
tabbed: ${isTab},
themeProps: {
accentColor: "gray",
scaling: "${scaling}",
},
features: {
vecdb: ${vecdb},
ast: ${ast},
}
})
RefactChat.render(root, ${serializedConfig})
}
</script>
</body>
Expand Down
32 changes: 3 additions & 29 deletions src/completionProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import * as vscode from 'vscode';
import * as estate from "./estate";
import * as fetchAPI from "./fetchAPI";
import * as fetchH2 from 'fetch-h2';
import { FimDebugData, fim } from 'refact-chat-js/dist/events';


Expand Down Expand Up @@ -165,10 +164,9 @@ export class MyInlineCompletionProvider implements vscode.InlineCompletionItemPr
return ["", -1];
}
let de_facto_model = json["model"];
let serial_number = json["snippet_telemetry_id"];
this.maybeSendFIMData(json);
global.status_bar.completion_model_worked(de_facto_model);
return [completion, serial_number];
return [completion, -1];
}

maybeSendFIMData(data: FimDebugData | null) {
Expand All @@ -192,33 +190,9 @@ export function _extract_extension(feed: estate.ApiFields)
}


export async function inline_accepted(serial_number: number)
export async function inline_accepted(_serial_number: number)
{
let url = fetchAPI.rust_url("/v1/snippet-accepted");
if (!url) {
console.log(["Failed to get url for /v1/snippet-accepted"]);
}
const post = JSON.stringify({
"snippet_telemetry_id": serial_number
});
const headers = {
"Content-Type": "application/json",
// "Authorization": `Bearer ${apiKey}`,
};
let req = new fetchH2.Request(url, {
method: "POST",
headers: headers,
body: post,
redirect: "follow",
cache: "no-cache",
referrer: "no-referrer"
});

try {
await fetchH2.fetch(req);
} catch (error) {
console.log("failed to post to /v1/snippet-accepted");
}
return;
}


Expand Down
Loading
Loading