Skip to content

Commit 81d5ec5

Browse files
committed
Refactor model provider upsert logic into a reusable utility, add support for reasoning effort configuration, and allow constant conditions in loops via ESLint
1 parent c76f8a9 commit 81d5ec5

24 files changed

Lines changed: 693 additions & 669 deletions

‎apps/editor/.eslintrc.json‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@
3131
"no-empty": "off",
3232
"react/react-in-jsx-scope": "off",
3333
"@typescript-eslint/no-namespace": "off",
34-
"no-undef": "off"
34+
"no-undef": "off",
35+
"no-constant-condition": ["error", { "checkLoops": false }]
3536
},
3637
"overrides": [
3738
{

‎apps/editor/src/commands/apply-context-command/sources/check-all-with-keywords-source.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ export const handle_check_all_with_keywords_source = async (
1111
extension_context: vscode.ExtensionContext
1212
): Promise<'back' | void> => {
1313
try {
14-
// eslint-disable-next-line no-constant-condition
1514
while (true) {
1615
const input_box = vscode.window.createInputBox()
1716
input_box.title = 'Keyword Search'
@@ -103,7 +102,6 @@ export const handle_check_all_with_keywords_source = async (
103102
}
104103

105104
// Inner loop for file selection
106-
// eslint-disable-next-line no-constant-condition
107105
while (true) {
108106
const quick_pick_items = matched_files.map((file_path) => {
109107
const workspace_root =

‎apps/editor/src/commands/apply-context-command/sources/commit-files-source.ts‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ export const handle_commit_files_source = async (
1818
return
1919
}
2020

21-
// eslint-disable-next-line no-constant-condition
2221
while (true) {
2322
const log_output = execSync('git log -n 20 --pretty=format:"%H|%s|%ar"', {
2423
cwd: repository.rootUri.fsPath,
@@ -131,7 +130,6 @@ export const handle_commit_files_source = async (
131130
}
132131

133132
// Inner loop for file selection
134-
// eslint-disable-next-line no-constant-condition
135133
while (true) {
136134
const file_items = valid_files.map((f) => ({
137135
label: path.basename(f.relative_path),

‎apps/editor/src/commands/apply-context-command/sources/json-file-source.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,6 @@ export const handle_json_file_source = async (
9494

9595
let active_dialog_count = 0
9696

97-
// eslint-disable-next-line no-constant-condition
9897
while (true) {
9998
const create_items = () => {
10099
const items: (vscode.QuickPickItem & {

‎apps/editor/src/commands/apply-context-command/sources/unstaged-files-source.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ export const handle_unstaged_files_source = async (
6565

6666
const workspace_roots = workspace_provider.get_workspace_roots()
6767

68-
// eslint-disable-next-line no-constant-condition
6968
while (true) {
7069
const quick_pick_items = await Promise.all(
7170
existing_unstaged_files.map(async (file_path) => {

‎apps/editor/src/commands/apply-context-command/sources/workspace-state-source.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ export const handle_workspace_state_source = async (
4545
tooltip: 'Delete'
4646
}
4747

48-
// eslint-disable-next-line no-constant-condition
4948
while (true) {
5049
const create_quick_pick_items = (contexts: SavedContext[]) => {
5150
const items: (vscode.QuickPickItem & {

‎apps/editor/src/views/panel/backend/message-handlers/handle-at-sign-quick-pick/handle-at-sign-quick-pick.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ const at_sign_quick_pick = async (params: {
134134

135135
let selected_path_item: QuickPickItem | undefined
136136

137-
// eslint-disable-next-line no-constant-condition
138137
while (true) {
139138
const all_quick_pick_items: QuickPickItem[] = checked_paths
140139
.filter((p) => {

‎apps/editor/src/views/panel/backend/message-handlers/handle-edit-context.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,6 @@ export const handle_edit_context = async (
401401
let current_config_id = message.config_id
402402
let should_show_quick_pick = message.use_quick_pick
403403

404-
// eslint-disable-next-line no-constant-condition
405404
while (true) {
406405
const config_result = await get_edit_context_config({
407406
api_providers_manager,

‎apps/editor/src/views/panel/backend/message-handlers/handle-hash-sign-quick-pick/handle-hash-sign-quick-pick.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ const hash_sign_quick_pick = async (params: {
7070
(item) => item.label == last_selected_symbol
7171
)
7272

73-
// eslint-disable-next-line no-constant-condition
7473
while (true) {
7574
const quick_pick = vscode.window.createQuickPick()
7675
quick_pick.items = items

‎apps/editor/src/views/panel/backend/message-handlers/handle-hash-sign-quick-pick/symbols/commit-symbol.ts‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ export const handle_commit_item = async (
3636
return undefined
3737
}
3838

39-
// eslint-disable-next-line no-constant-condition
4039
while (true) {
4140
let selected_folder: vscode.WorkspaceFolder | undefined
4241

0 commit comments

Comments
 (0)