Commit a65a4ba
committed
fix: add input validation for codebaseIndexEmbedderModelDimension and fix test expectations
- Added validation in config-manager.ts to ensure codebaseIndexEmbedderModelDimension is a valid positive number
- Fixed error message formatting in service-factory.ts to include bold/underline formatting for 'OpenAI-Compatible'
- Updated tests to use config.modelDimension instead of openAiCompatibleOptions.modelDimension
- Added check for vectorSize <= 0 in addition to undefined check1 parent ab039b5 commit a65a4ba
File tree
3 files changed
+27
-7
lines changed- src/services/code-index
- __tests__
3 files changed
+27
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
406 | 406 | | |
407 | 407 | | |
408 | 408 | | |
| 409 | + | |
409 | 410 | | |
410 | | - | |
| 411 | + | |
| 412 | + | |
411 | 413 | | |
412 | 414 | | |
413 | 415 | | |
| |||
463 | 465 | | |
464 | 466 | | |
465 | 467 | | |
| 468 | + | |
466 | 469 | | |
467 | | - | |
| 470 | + | |
| 471 | + | |
468 | 472 | | |
469 | 473 | | |
470 | 474 | | |
| |||
474 | 478 | | |
475 | 479 | | |
476 | 480 | | |
477 | | - | |
| 481 | + | |
478 | 482 | | |
479 | 483 | | |
480 | 484 | | |
| |||
496 | 500 | | |
497 | 501 | | |
498 | 502 | | |
499 | | - | |
| 503 | + | |
500 | 504 | | |
501 | 505 | | |
502 | 506 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
78 | 94 | | |
79 | 95 | | |
80 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
107 | 107 | | |
108 | 108 | | |
109 | 109 | | |
110 | | - | |
| 110 | + | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
114 | 114 | | |
115 | 115 | | |
116 | 116 | | |
| |||
0 commit comments