Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d7b8d73
added loading bar in corner
dadukhankevin Feb 4, 2026
4aaafc4
fixed auth
dadukhankevin Feb 4, 2026
8f2900b
Merge branch 'main' into daniel/fix_startup
dadukhankevin Feb 9, 2026
e33cd23
Implement directory removal with retries to handle race conditions in…
TimRl Feb 7, 2026
603935a
Enhanced project swap validation by re-checking active swaps on remot…
TimRl Feb 7, 2026
726f125
Implement tests to ensure cleanup of localProjectSwap when remote pro…
TimRl Feb 7, 2026
b2e2621
Enhanced project swap handling by introducing remoteUnreachable flag …
TimRl Feb 7, 2026
b54daab
Refactored project synchronization handling to introduce a 'serverUnr…
TimRl Feb 7, 2026
0d55647
Refactored project handling to improve offline functionality. Introdu…
TimRl Feb 7, 2026
4f09043
Add HTTP error simulation tests for fetchRemoteMetadata and fetchRemo…
TimRl Feb 7, 2026
d509cb8
Enhanced project operation feedback by adding UI locking mechanisms d…
TimRl Feb 7, 2026
acbe75b
Fix type definition in projectSwap test to include missing semicolon …
TimRl Feb 8, 2026
d41b600
Enhanced project swap handling by introducing logic to hide new proje…
TimRl Feb 8, 2026
ec07e6a
Implemented user swap completion tracking and enhance project swap no…
TimRl Feb 10, 2026
232dacd
Refined media strategy dropdown logic in ProjectCard to unlock for us…
TimRl Feb 10, 2026
bbb07b3
Enhanced project list refresh logic and added loading indicators for …
TimRl Feb 10, 2026
0fe02e0
Implemented version gating for project swap, update, and copy operati…
TimRl Feb 10, 2026
7e20bce
switching between webviews instantly (#602)
dadukhankevin Feb 10, 2026
afeba10
System message editing (#538)
Luke-Bilhorn Feb 10, 2026
09ae705
Daniel/better replace and remove lab (#533)
dadukhankevin Feb 10, 2026
517b96f
Bumped codex to 0.20.0 and REQUIRED_FRONTIER_VERSION to 0.4.23
TimRl Feb 10, 2026
d704dc4
- Fix linting error in CodexCellEditor.
LeviXIII Feb 11, 2026
52a5888
added loading bar in corner
dadukhankevin Feb 4, 2026
61b4ed1
update sync button when logged in
dadukhankevin Feb 11, 2026
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
16 changes: 1 addition & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"url": "https://github.com/genesis-ai-dev/codex-editor"
},
"license": "MIT",
"version": "0.19.0",
"version": "0.20.0",
"engines": {
"node": ">=18.0.0",
"vscode": "^1.78.0"
Expand Down Expand Up @@ -49,15 +49,6 @@
"contextualTitle": "Codex Project Settings"
}
],
"automated-testing-view": [
{
"type": "webview",
"id": "codex-editor.automatedTesting",
"name": "Automated Testing",
"icon": "$(beaker)",
"contextualTitle": "Automated Testing"
}
],
"search-passages-view": [
{
"type": "webview",
Expand Down Expand Up @@ -105,11 +96,6 @@
"title": "Codex Main Menu",
"icon": "$(list-tree)"
},
{
"id": "automated-testing-view",
"title": "Automated Testing",
"icon": "$(beaker)"
},
{
"id": "codex-files-view",
"title": "Navigation",
Expand Down
2 changes: 1 addition & 1 deletion src/activationHelpers/contextAware/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ export async function registerCommands(context: vscode.ExtensionContext) {

const setEditorFontCommand = vscode.commands.registerCommand(
"codex-editor-extension.setEditorFontToTargetLanguage",
await setTargetFont
setTargetFont
);

const exportCodexContentCommand = vscode.commands.registerCommand(
Expand Down
63 changes: 40 additions & 23 deletions src/activationHelpers/contextAware/contentIndexes/indexes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import { readSourceAndTargetFiles } from "./fileReaders";
import { debounce } from "lodash";
import { MinimalCellResult, TranslationPair } from "../../../../../types";
import { getNotebookMetadataManager } from "../../../../utils/notebookMetadataManager";
import { updateSplashScreenTimings } from "../../../../providers/SplashScreen/register";
import { FileSyncManager, FileSyncResult } from "../fileSyncManager";

type WordFrequencyMap = Map<string, WordOccurrence[]>;
Expand Down Expand Up @@ -859,30 +858,38 @@ export async function createIndexWithContext(context: vscode.ExtensionContext) {
prompt: "Enter a query to search all cells",
placeHolder: "e.g. love, faith, hope",
});
if (!query) return []; // User cancelled the input
if (!query) return [];
showInfo = true;
}

const searchScope = options?.searchScope || "both";
const selectedFiles = options?.selectedFiles || [];
const completeOnly = options?.completeOnly || false;
const isParallelPassagesWebview = options?.isParallelPassagesWebview || false;

let results: TranslationPair[] = [];

// If we only want complete pairs and we have SQLite, use the more reliable method
// When includeIncomplete=false, use optimized SQLite path for complete pairs only
// When includeIncomplete=true, use searchAllCells which adds source-only cells
if (!includeIncomplete && translationPairsIndex instanceof SQLiteIndexManager) {
const searchScope = options?.searchScope || "both";
// Request more results if we need to filter by searchScope
const searchLimit = searchScope !== "both" ? k * 3 : k;
// For UI search, search source-only only when searchScope is "source"
// For "target" and "both", search both source and target (then filter for target if needed)
// Determine search mode based on scope
// searchSourceOnly=true means only search source content
// searchSourceOnly=false means search both source and target
const searchSourceOnly = searchScope === "source";

// Request extra results to account for post-filtering
const searchLimit = k * 2;

const searchResults = await translationPairsIndex.searchCompleteTranslationPairsWithValidation(
query,
searchLimit,
options?.isParallelPassagesWebview || false,
false, // onlyValidated - show all complete pairs regardless of validation status
isParallelPassagesWebview,
completeOnly, // Pass through completeOnly for validation filtering
searchSourceOnly
);

// Convert to TranslationPair format
let translationPairs = searchResults.map((result) => ({
let translationPairs: TranslationPair[] = searchResults.map((result) => ({
cellId: result.cellId || result.cell_id,
sourceCell: {
cellId: result.cellId || result.cell_id,
Expand All @@ -898,25 +905,35 @@ export async function createIndexWithContext(context: vscode.ExtensionContext) {
},
}));

// Apply searchScope filtering if needed
if (searchScope === "source" || searchScope === "target") {
// Filter out pairs with empty or minimal content
// Strip HTML and check for meaningful content (not just whitespace or very short text)
translationPairs = translationPairs.filter((pair) => {
const sourceText = stripHtml(pair.sourceCell.content || "").trim();
const targetText = stripHtml(pair.targetCell.content || "").trim();
// Require both source and target to have meaningful content (more than 3 chars)
return sourceText.length > 3 && targetText.length > 3;
});

// Apply searchScope content filtering - verify query actually appears in content
if (query.trim()) {
const queryLower = query.toLowerCase();
translationPairs = translationPairs.filter((pair) => {
const cleanSource = stripHtml(pair.sourceCell.content || "");
const cleanTarget = stripHtml(pair.targetCell.content || "");

if (searchScope === "source") {
if (!pair.sourceCell.content) return false;
const cleanSource = stripHtml(pair.sourceCell.content);
return cleanSource.includes(queryLower);
} else {
if (!pair.targetCell.content) return false;
const cleanTarget = stripHtml(pair.targetCell.content);
} else if (searchScope === "target") {
return cleanTarget.includes(queryLower);
} else {
// "both" - query should appear in either source or target
return cleanSource.includes(queryLower) || cleanTarget.includes(queryLower);
}
});
}

// Apply selectedFiles filtering if needed
if (options?.selectedFiles && options.selectedFiles.length > 0) {
const selectedFiles = options.selectedFiles;
// Apply selectedFiles filtering
if (selectedFiles.length > 0) {
translationPairs = translationPairs.filter((pair) => {
const sourceUri = pair.sourceCell?.uri || "";
const targetUri = pair.targetCell?.uri || "";
Expand All @@ -931,14 +948,14 @@ export async function createIndexWithContext(context: vscode.ExtensionContext) {

results = translationPairs.slice(0, k);
} else {
// Use the original method for incomplete searches or non-SQLite indexes
// Fallback for incomplete searches or non-SQLite indexes
results = await searchAllCells(
translationPairsIndex,
sourceTextIndex,
query,
k,
includeIncomplete,
options // Pass through options including isParallelPassagesWebview
options
);
}

Expand Down
Loading