Batch fixes before release (#1011)
* fix: improve projectRoot * fix: improve task-master lang command * feat: add documentation to the readme so more people can access it * fix: expand command subtask dependency validation * fix: update command more reliable with perplexity and other models * chore: fix CI * chore: implement requested changes * chore: fix CI
This commit is contained in:
@@ -25,6 +25,10 @@ import { findConfigPath } from '../../../src/utils/path-utils.js';
|
||||
import { log } from '../utils.js';
|
||||
import { CUSTOM_PROVIDERS } from '../../../src/constants/providers.js';
|
||||
|
||||
// Constants
|
||||
const CONFIG_MISSING_ERROR =
|
||||
'The configuration file is missing. Run "task-master init" to create it.';
|
||||
|
||||
/**
|
||||
* Fetches the list of models from OpenRouter API.
|
||||
* @returns {Promise<Array|null>} A promise that resolves with the list of model IDs or null if fetch fails.
|
||||
@@ -168,9 +172,7 @@ async function getModelConfiguration(options = {}) {
|
||||
);
|
||||
|
||||
if (!configExists) {
|
||||
throw new Error(
|
||||
'The configuration file is missing. Run "task-master models --setup" to create it.'
|
||||
);
|
||||
throw new Error(CONFIG_MISSING_ERROR);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -298,9 +300,7 @@ async function getAvailableModelsList(options = {}) {
|
||||
);
|
||||
|
||||
if (!configExists) {
|
||||
throw new Error(
|
||||
'The configuration file is missing. Run "task-master models --setup" to create it.'
|
||||
);
|
||||
throw new Error(CONFIG_MISSING_ERROR);
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -391,9 +391,7 @@ async function setModel(role, modelId, options = {}) {
|
||||
);
|
||||
|
||||
if (!configExists) {
|
||||
throw new Error(
|
||||
'The configuration file is missing. Run "task-master models --setup" to create it.'
|
||||
);
|
||||
throw new Error(CONFIG_MISSING_ERROR);
|
||||
}
|
||||
|
||||
// Validate role
|
||||
|
||||
Reference in New Issue
Block a user