Skip to content
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
2 changes: 1 addition & 1 deletion apps/playwright-e2e/helpers/test-setup-helpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export async function setupTestEnvironment(page: Page): Promise<void> {
await waitForAllExtensionActivation(page)

await verifyExtensionInstalled(page)
await waitForWebviewText(page, "Welcome to Axon Code!")
await waitForWebviewText(page, "Welcome to Axon Code")

await configureApiKeyThroughUI(page)
await waitForWebviewText(page, "Generate, refactor, and debug code with AI assistance")
Expand Down
2 changes: 1 addition & 1 deletion apps/playwright-e2e/tests/chat.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import {
test.describe("E2E Chat Test", () => {
test("should configure credentials and send a message", async ({ workbox: page, takeScreenshot }: TestFixtures) => {
await verifyExtensionInstalled(page)
await waitForWebviewText(page, "Welcome to Axon Code!")
await waitForWebviewText(page, "Welcome to Axon Code")

await configureApiKeyThroughUI(page)
await waitForWebviewText(page, "Generate, refactor, and debug code with AI assistance")
Expand Down
2 changes: 1 addition & 1 deletion src/core/prompts/tools/native-tools/edit_file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export default {
function: {
name: "edit_file",
description:
"Use this tool to make an edit to a file. A less intelligent apply model will read your request, so be clear about the change while minimizing unchanged code. Specify each edit sequentially and replace omitted sections with // ... existing code ... placeholders. Provide enough surrounding context to avoid ambiguity, always use the placeholder when skipping existing content, show before-and-after context when deleting, and gather all edits for the file in a single request.",
"Use this tool to make an edit to a file. A less intelligent apply model will read your request, so be clear about the change while minimizing unchanged code. Specify each edit sequentially and replace omitted sections with // ... existing code ... placeholders. Provide enough surrounding context to avoid ambiguity, always use the placeholder when skipping existing content, show before-and-after context when deleting, and gather all edits for the file in a single request. Before calling file_edit, always use read_file to fetch and confirm the exact old_string matches the current file content. If it doesn't, adjust and retry. Do not proceed with file_edit until verified.",
strict: true,
parameters: {
type: "object",
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"displayName": "%extension.displayName%",
"description": "%extension.description%",
"publisher": "matterai",
"version": "4.210.0",
"version": "4.210.1",
"icon": "assets/icons/matterai-ic.png",
"galleryBanner": {
"color": "#FFFFFF",
Expand Down
4 changes: 2 additions & 2 deletions src/services/code-index/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ export const MAX_FILE_SIZE_BYTES = 1 * 1024 * 1024 // 1MB

/**Directory Scanner */
export const MAX_LIST_FILES_LIMIT_CODE_INDEX = 50_000
export const BATCH_SEGMENT_THRESHOLD = 60 // Number of code segments to batch for embeddings/upserts
export const BATCH_SEGMENT_THRESHOLD = 10 // Number of code segments to batch for embeddings/upserts
export const MAX_BATCH_RETRIES = 3
export const INITIAL_RETRY_DELAY_MS = 500
export const PARSING_CONCURRENCY = 10
export const MAX_PENDING_BATCHES = 20 // Maximum number of batches to accumulate before waiting
export const MAX_PENDING_BATCHES = 50 // Maximum number of batches to accumulate before waiting

/**OpenAI Embedder */
export const MAX_BATCH_TOKENS = 100000
Expand Down
17 changes: 2 additions & 15 deletions src/services/code-index/processors/file-watcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,26 +80,13 @@ export class FileWatcher implements IFileWatcher {
private vectorStore?: IVectorStore,
ignoreInstance?: Ignore,
ignoreController?: RooIgnoreController,
batchSegmentThreshold?: number,
_batchSegmentThreshold?: number,
) {
this.ignoreController = ignoreController || new RooIgnoreController(workspacePath)
if (ignoreInstance) {
this.ignoreInstance = ignoreInstance
}
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
Comment on lines +83 to +89
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Code Quality

Issue: The constructor accepts _batchSegmentThreshold but ignores it, hardcoding this.batchSegmentThreshold to the constant. This prevents configuration overrides (e.g., for testing) and makes the parameter misleading.

Fix: Use the passed parameter if available, falling back to the constant. Remove the _ prefix to indicate it is used.

Impact: Improves code correctness and testability

Suggested change
_batchSegmentThreshold?: number,
) {
this.ignoreController = ignoreController || new RooIgnoreController(workspacePath)
if (ignoreInstance) {
this.ignoreInstance = ignoreInstance
}
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
batchSegmentThreshold?: number,
) {
this.ignoreController = ignoreController || new RooIgnoreController(workspacePath)
if (ignoreInstance) {
this.ignoreInstance = ignoreInstance
}
this.batchSegmentThreshold = batchSegmentThreshold ?? BATCH_SEGMENT_THRESHOLD

}

/**
Expand Down
17 changes: 2 additions & 15 deletions src/services/code-index/processors/scanner.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,22 +41,9 @@ export class DirectoryScanner implements IDirectoryScanner {
private readonly codeParser: ICodeParser,
private readonly cacheManager: CacheManager,
private readonly ignoreInstance: Ignore,
batchSegmentThreshold?: number,
_batchSegmentThreshold?: number,
) {
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
Comment on lines +44 to +46
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Code Quality

Issue: The constructor accepts _batchSegmentThreshold but ignores it, hardcoding this.batchSegmentThreshold to the constant. This prevents configuration overrides (e.g., for testing) and makes the parameter misleading.

Fix: Use the passed parameter if available, falling back to the constant. Remove the _ prefix to indicate it is used.

Impact: Improves code correctness and testability

Suggested change
_batchSegmentThreshold?: number,
) {
// Get the configurable batch size from VSCode settings, fallback to default
// If not provided in constructor, try to get from VSCode settings
if (batchSegmentThreshold !== undefined) {
this.batchSegmentThreshold = batchSegmentThreshold
} else {
try {
this.batchSegmentThreshold = vscode.workspace
.getConfiguration(Package.name)
.get<number>("codeIndex.embeddingBatchSize", BATCH_SEGMENT_THRESHOLD)
} catch {
// In test environment, vscode.workspace might not be available
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
}
}
this.batchSegmentThreshold = BATCH_SEGMENT_THRESHOLD
batchSegmentThreshold?: number,
) {
this.batchSegmentThreshold = batchSegmentThreshold ?? BATCH_SEGMENT_THRESHOLD

}

// kilocode_change start
Expand Down
24 changes: 17 additions & 7 deletions webview-ui/src/components/kilocode/common/KiloCodeAuth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,23 @@ const KiloCodeAuth: React.FC<KiloCodeAuthProps> = ({ onManualConfigClick, classN
const { t } = useAppTranslation()

return (
<div className={`flex flex-col items-center ${className}`}>
<div className={`flex flex-col items-start ${className}`}>
<Logo />

<h2 className="m-0 p-0 mb-4">{t("kilocode:welcome.greeting")}</h2>
<p className="text-center mb-2">{t("kilocode:welcome.introText1")}</p>
<p className="text-center mb-2">{t("kilocode:welcome.introText2")}</p>
<p className="text-center mb-5">{t("kilocode:welcome.introText3")}</p>

<div className="w-full flex flex-col gap-5">
<h2 className="m-0 p-0 mb-1" style={{ color: "#c4fdff" }}>
{t("kilocode:welcome.greeting")}
</h2>
<h3 className="m-0 p-0 mb-4" style={{ color: "#c4fdff" }}>
{t("kilocode:welcome.tagline")}
</h3>
<p className="text-left mb-2" style={{ color: "#8bf4f7" }}>
{t("kilocode:welcome.introText1")}
</p>
<p className="text-left mb-5" style={{ color: "#8bf4f7" }}>
{t("kilocode:welcome.introText2")}
</p>

<div className="w-full flex flex-col gap-4">
<ButtonLink
href={getKiloCodeBackendSignUpUrl(uriScheme, uiKind, kiloCodeWrapperProperties)}
onClick={() => {
Expand All @@ -36,6 +44,8 @@ const KiloCodeAuth: React.FC<KiloCodeAuthProps> = ({ onManualConfigClick, classN
{t("kilocode:welcome.ctaButton")}
</ButtonLink>

<ButtonLink href="https://matterai.so">{t("kilocode:welcome.exploreMatterAI")}</ButtonLink>

{/* {!!onManualConfigClick && (
<ButtonSecondary onClick={() => onManualConfigClick && onManualConfigClick()}>
{t("kilocode:welcome.manualModeButton")}
Expand Down
9 changes: 5 additions & 4 deletions webview-ui/src/i18n/locales/en/kilocode.json
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
{
"welcome": {
"greeting": "Welcome to Axon Code!",
"introText1": "Axon Code is a free, open source AI coding agent.",
"introText2": "Powered by Axon models by MatterAI.",
"introText3": "Create a free account and get 7-day free trial!",
"greeting": "Welcome to Axon Code, By MatterAI",
"tagline": "The AI Engineering Agent",
"introText1": "Boost your engineering productivity with the complete AI Engineer to Build, Debug and Review your code.",
"introText2": "Create a free account with $5 credits (~100 tasks) every month!",
"ctaButton": "Get Started",
"exploreMatterAI": "Explore MatterAI",
"manualModeButton": "Use your own API key",
"alreadySignedUp": "Already signed up?",
"loginText": "Log in here"
Expand Down
Loading