sphereai-cli 1.0.18 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +12 -12
- package/README.md +282 -282
- package/dist/commands/execute.d.ts.map +1 -1
- package/dist/commands/execute.js +17 -20
- package/dist/commands/execute.js.map +1 -1
- package/dist/index.js +45 -45
- package/package.json +1 -1
- package/dist/commands/language.d.ts +0 -3
- package/dist/commands/language.d.ts.map +0 -1
- package/dist/commands/language.js +0 -55
- package/dist/commands/language.js.map +0 -1
- package/dist/commands/models.d.ts +0 -3
- package/dist/commands/models.d.ts.map +0 -1
- package/dist/commands/models.js +0 -70
- package/dist/commands/models.js.map +0 -1
- package/dist/i18n/index.d.ts +0 -11
- package/dist/i18n/index.d.ts.map +0 -1
- package/dist/i18n/index.js +0 -26
- package/dist/i18n/index.js.map +0 -1
- package/dist/i18n/translations/en.d.ts +0 -93
- package/dist/i18n/translations/en.d.ts.map +0 -1
- package/dist/i18n/translations/en.js +0 -105
- package/dist/i18n/translations/en.js.map +0 -1
- package/dist/i18n/translations/pt.d.ts +0 -93
- package/dist/i18n/translations/pt.d.ts.map +0 -1
- package/dist/i18n/translations/pt.js +0 -105
- package/dist/i18n/translations/pt.js.map +0 -1
- package/dist/utils/file-walker.d.ts +0 -31
- package/dist/utils/file-walker.d.ts.map +0 -1
- package/dist/utils/file-walker.js +0 -118
- package/dist/utils/file-walker.js.map +0 -1
- package/dist/utils/ignore-parser.d.ts +0 -21
- package/dist/utils/ignore-parser.d.ts.map +0 -1
- package/dist/utils/ignore-parser.js +0 -170
- package/dist/utils/ignore-parser.js.map +0 -1
package/dist/index.js
CHANGED
|
@@ -54,51 +54,51 @@ program
|
|
|
54
54
|
(0, debug_1.registerDebugCommand)(program);
|
|
55
55
|
(0, init_1.registerInitCommand)(program);
|
|
56
56
|
// Add help examples
|
|
57
|
-
program.addHelpText('after', `
|
|
58
|
-
|
|
59
|
-
Examples:
|
|
60
|
-
# Authenticate using UserChannelKey
|
|
61
|
-
$ sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
62
|
-
|
|
63
|
-
# Authenticate using OAuth2 (legacy)
|
|
64
|
-
$ sphereai auth login-oauth
|
|
65
|
-
|
|
66
|
-
# Set token manually
|
|
67
|
-
$ sphereai auth set-token eyJhbGc...
|
|
68
|
-
|
|
69
|
-
# Check current user
|
|
70
|
-
$ sphereai auth whoami
|
|
71
|
-
|
|
72
|
-
# List all prompts
|
|
73
|
-
$ sphereai prompts list
|
|
74
|
-
|
|
75
|
-
# List prompts with pagination
|
|
76
|
-
$ sphereai prompts list --page 2 --size 20
|
|
77
|
-
|
|
78
|
-
# List prompts in JSON format
|
|
79
|
-
$ sphereai prompts list --output json
|
|
80
|
-
|
|
81
|
-
# Add all files from current directory
|
|
82
|
-
$ sphereai files add .
|
|
83
|
-
|
|
84
|
-
# Add a specific file
|
|
85
|
-
$ sphereai files add src/index.ts
|
|
86
|
-
|
|
87
|
-
# List tracked files
|
|
88
|
-
$ sphereai files list
|
|
89
|
-
|
|
90
|
-
# Show status of tracked files
|
|
91
|
-
$ sphereai files status
|
|
92
|
-
|
|
93
|
-
# Clear all tracked files
|
|
94
|
-
$ sphereai files clear --force
|
|
95
|
-
|
|
96
|
-
# Execute AI command with tracked files
|
|
97
|
-
$ sphereai execute --prompt-id 123
|
|
98
|
-
|
|
99
|
-
Configuration:
|
|
100
|
-
Config file location: ~/.config/sphereai-cli/config.json
|
|
101
|
-
View config: sphereai auth config
|
|
57
|
+
program.addHelpText('after', `
|
|
58
|
+
|
|
59
|
+
Examples:
|
|
60
|
+
# Authenticate using UserChannelKey
|
|
61
|
+
$ sphereai auth login YOUR_USER_CHANNEL_KEY
|
|
62
|
+
|
|
63
|
+
# Authenticate using OAuth2 (legacy)
|
|
64
|
+
$ sphereai auth login-oauth
|
|
65
|
+
|
|
66
|
+
# Set token manually
|
|
67
|
+
$ sphereai auth set-token eyJhbGc...
|
|
68
|
+
|
|
69
|
+
# Check current user
|
|
70
|
+
$ sphereai auth whoami
|
|
71
|
+
|
|
72
|
+
# List all prompts
|
|
73
|
+
$ sphereai prompts list
|
|
74
|
+
|
|
75
|
+
# List prompts with pagination
|
|
76
|
+
$ sphereai prompts list --page 2 --size 20
|
|
77
|
+
|
|
78
|
+
# List prompts in JSON format
|
|
79
|
+
$ sphereai prompts list --output json
|
|
80
|
+
|
|
81
|
+
# Add all files from current directory
|
|
82
|
+
$ sphereai files add .
|
|
83
|
+
|
|
84
|
+
# Add a specific file
|
|
85
|
+
$ sphereai files add src/index.ts
|
|
86
|
+
|
|
87
|
+
# List tracked files
|
|
88
|
+
$ sphereai files list
|
|
89
|
+
|
|
90
|
+
# Show status of tracked files
|
|
91
|
+
$ sphereai files status
|
|
92
|
+
|
|
93
|
+
# Clear all tracked files
|
|
94
|
+
$ sphereai files clear --force
|
|
95
|
+
|
|
96
|
+
# Execute AI command with tracked files
|
|
97
|
+
$ sphereai execute --prompt-id 123
|
|
98
|
+
|
|
99
|
+
Configuration:
|
|
100
|
+
Config file location: ~/.config/sphereai-cli/config.json
|
|
101
|
+
View config: sphereai auth config
|
|
102
102
|
`);
|
|
103
103
|
// Parse command line arguments
|
|
104
104
|
program.parse(process.argv);
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"language.d.ts","sourceRoot":"","sources":["../../src/commands/language.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAUpC,wBAAgB,uBAAuB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAgD9D"}
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.registerLanguageCommand = registerLanguageCommand;
|
|
4
|
-
const config_service_1 = require("../services/config-service");
|
|
5
|
-
const formatters_1 = require("../utils/formatters");
|
|
6
|
-
const i18n_1 = require("../i18n");
|
|
7
|
-
const AVAILABLE_LANGUAGES = [
|
|
8
|
-
{ code: 'en', name: 'English' },
|
|
9
|
-
{ code: 'pt', name: 'Portuguese' },
|
|
10
|
-
];
|
|
11
|
-
function registerLanguageCommand(program) {
|
|
12
|
-
const language = program
|
|
13
|
-
.command('language')
|
|
14
|
-
.alias('lang')
|
|
15
|
-
.description('Manage CLI language settings');
|
|
16
|
-
language
|
|
17
|
-
.command('set <lang>')
|
|
18
|
-
.description('Set the CLI language (en, pt)')
|
|
19
|
-
.action((lang) => {
|
|
20
|
-
const normalizedLang = lang.toLowerCase();
|
|
21
|
-
if (normalizedLang !== 'en' && normalizedLang !== 'pt') {
|
|
22
|
-
console.error(i18n_1.i18n.t.language.invalid);
|
|
23
|
-
console.log('\n' + i18n_1.i18n.t.language.available);
|
|
24
|
-
AVAILABLE_LANGUAGES.forEach(({ code, name }) => {
|
|
25
|
-
console.log(` ${code} - ${name}`);
|
|
26
|
-
});
|
|
27
|
-
process.exit(1);
|
|
28
|
-
}
|
|
29
|
-
config_service_1.configService.setLanguage(normalizedLang);
|
|
30
|
-
(0, formatters_1.success)(i18n_1.i18n.format(i18n_1.i18n.t.language.changed, { language: normalizedLang }));
|
|
31
|
-
});
|
|
32
|
-
language
|
|
33
|
-
.command('get')
|
|
34
|
-
.description('Show current language setting')
|
|
35
|
-
.action(() => {
|
|
36
|
-
const currentLang = config_service_1.configService.getLanguage();
|
|
37
|
-
const langInfo = AVAILABLE_LANGUAGES.find(l => l.code === currentLang);
|
|
38
|
-
(0, formatters_1.info)(i18n_1.i18n.format(i18n_1.i18n.t.language.current, {
|
|
39
|
-
language: `${currentLang} (${langInfo?.name || currentLang})`
|
|
40
|
-
}));
|
|
41
|
-
});
|
|
42
|
-
language
|
|
43
|
-
.command('list')
|
|
44
|
-
.alias('ls')
|
|
45
|
-
.description('List available languages')
|
|
46
|
-
.action(() => {
|
|
47
|
-
const currentLang = config_service_1.configService.getLanguage();
|
|
48
|
-
console.log(i18n_1.i18n.t.language.available);
|
|
49
|
-
AVAILABLE_LANGUAGES.forEach(({ code, name }) => {
|
|
50
|
-
const marker = code === currentLang ? ' (current)' : '';
|
|
51
|
-
console.log(` ${code} - ${name}${marker}`);
|
|
52
|
-
});
|
|
53
|
-
});
|
|
54
|
-
}
|
|
55
|
-
//# sourceMappingURL=language.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"language.js","sourceRoot":"","sources":["../../src/commands/language.ts"],"names":[],"mappings":";;AAUA,0DAgDC;AAzDD,+DAAqE;AACrE,oDAAoD;AACpD,kCAA+B;AAE/B,MAAM,mBAAmB,GAAuC;IAC9D,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE;IAC/B,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE;CACnC,CAAC;AAEF,SAAgB,uBAAuB,CAAC,OAAgB;IACtD,MAAM,QAAQ,GAAG,OAAO;SACrB,OAAO,CAAC,UAAU,CAAC;SACnB,KAAK,CAAC,MAAM,CAAC;SACb,WAAW,CAAC,8BAA8B,CAAC,CAAC;IAE/C,QAAQ;SACL,OAAO,CAAC,YAAY,CAAC;SACrB,WAAW,CAAC,+BAA+B,CAAC;SAC5C,MAAM,CAAC,CAAC,IAAY,EAAE,EAAE;QACvB,MAAM,cAAc,GAAG,IAAI,CAAC,WAAW,EAAE,CAAC;QAE1C,IAAI,cAAc,KAAK,IAAI,IAAI,cAAc,KAAK,IAAI,EAAE,CAAC;YACvD,OAAO,CAAC,KAAK,CAAC,WAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;YACvC,OAAO,CAAC,GAAG,CAAC,IAAI,GAAG,WAAI,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;YAC9C,mBAAmB,CAAC,OAAO,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE;gBAC7C,OAAO,CAAC,GAAG,CAAC,KAAK,IAA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CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,EAAE,CAAC;YACxD,OAAO,CAAC,GAAG,CAAC,KAAK,IAAI,MAAM,IAAI,GAAG,MAAM,EAAE,CAAC,CAAC;QAC9C,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"models.d.ts","sourceRoot":"","sources":["../../src/commands/models.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAYpC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAoE7D"}
|
package/dist/commands/models.js
DELETED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.registerModelsCommands = registerModelsCommands;
|
|
7
|
-
const ora_1 = __importDefault(require("ora"));
|
|
8
|
-
const api_client_1 = require("../services/api-client");
|
|
9
|
-
const config_service_1 = require("../services/config-service");
|
|
10
|
-
const formatters_1 = require("../utils/formatters");
|
|
11
|
-
const errors_1 = require("../utils/errors");
|
|
12
|
-
function registerModelsCommands(program) {
|
|
13
|
-
const models = program
|
|
14
|
-
.command('models')
|
|
15
|
-
.description('AI Models management commands');
|
|
16
|
-
// List models command
|
|
17
|
-
models
|
|
18
|
-
.command('list')
|
|
19
|
-
.alias('ls')
|
|
20
|
-
.description('List available AI models')
|
|
21
|
-
.option('-p, --page <number>', 'Page number', parseInt, 1)
|
|
22
|
-
.option('-s, --size <number>', 'Page size', parseInt, 20)
|
|
23
|
-
.option('-a, --active-only', 'Show only active models', false)
|
|
24
|
-
.option('-o, --output <format>', 'Output format (json|table)', 'table')
|
|
25
|
-
.action(async (options) => {
|
|
26
|
-
try {
|
|
27
|
-
const token = config_service_1.configService.getToken();
|
|
28
|
-
(0, errors_1.requireAuth)(token);
|
|
29
|
-
const spinner = (0, ora_1.default)('Fetching AI models...').start();
|
|
30
|
-
const queryParams = {
|
|
31
|
-
_page: options.page,
|
|
32
|
-
_size: options.size,
|
|
33
|
-
_order: 'name'
|
|
34
|
-
};
|
|
35
|
-
// Filter active only
|
|
36
|
-
if (options.activeOnly) {
|
|
37
|
-
queryParams.active = true;
|
|
38
|
-
}
|
|
39
|
-
const modelsData = await api_client_1.apiClient.listModels(queryParams);
|
|
40
|
-
spinner.stop();
|
|
41
|
-
const format = options.output;
|
|
42
|
-
console.log((0, formatters_1.formatModelsList)(modelsData, format));
|
|
43
|
-
(0, formatters_1.info)(`Showing page ${options.page} (${modelsData.length} results)`);
|
|
44
|
-
}
|
|
45
|
-
catch (err) {
|
|
46
|
-
(0, errors_1.handleError)(err);
|
|
47
|
-
}
|
|
48
|
-
});
|
|
49
|
-
// Get model command
|
|
50
|
-
models
|
|
51
|
-
.command('get')
|
|
52
|
-
.description('Get AI model details by ID')
|
|
53
|
-
.argument('<model-id>', 'AI Model ID', parseInt)
|
|
54
|
-
.option('-o, --output <format>', 'Output format (json|table)', 'table')
|
|
55
|
-
.action(async (modelId, options) => {
|
|
56
|
-
try {
|
|
57
|
-
const token = config_service_1.configService.getToken();
|
|
58
|
-
(0, errors_1.requireAuth)(token);
|
|
59
|
-
const spinner = (0, ora_1.default)('Fetching model details...').start();
|
|
60
|
-
const model = await api_client_1.apiClient.getModel(modelId);
|
|
61
|
-
spinner.stop();
|
|
62
|
-
const format = options.output;
|
|
63
|
-
console.log((0, formatters_1.formatModel)(model, format));
|
|
64
|
-
}
|
|
65
|
-
catch (err) {
|
|
66
|
-
(0, errors_1.handleError)(err);
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
//# sourceMappingURL=models.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"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i18n/index.d.ts
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Language } from '../services/config-service';
|
|
2
|
-
import { en } from './translations/en';
|
|
3
|
-
type TranslationKeys = typeof en;
|
|
4
|
-
declare class I18nService {
|
|
5
|
-
private getCurrentTranslations;
|
|
6
|
-
get t(): TranslationKeys;
|
|
7
|
-
format(template: string, params: Record<string, string | number>): string;
|
|
8
|
-
}
|
|
9
|
-
export declare const i18n: I18nService;
|
|
10
|
-
export { Language };
|
|
11
|
-
//# sourceMappingURL=index.d.ts.map
|
package/dist/i18n/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAiB,QAAQ,EAAE,MAAM,4BAA4B,CAAC;AACrE,OAAO,EAAE,EAAE,EAAE,MAAM,mBAAmB,CAAC;AAGvC,KAAK,eAAe,GAAG,OAAO,EAAE,CAAC;AAOjC,cAAM,WAAW;IACf,OAAO,CAAC,sBAAsB;IAK9B,IAAI,CAAC,IAAI,eAAe,CAEvB;IAED,MAAM,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM;CAK1E;AAED,eAAO,MAAM,IAAI,aAAoB,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/i18n/index.js
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.i18n = void 0;
|
|
4
|
-
const config_service_1 = require("../services/config-service");
|
|
5
|
-
const en_1 = require("./translations/en");
|
|
6
|
-
const pt_1 = require("./translations/pt");
|
|
7
|
-
const translations = {
|
|
8
|
-
en: en_1.en,
|
|
9
|
-
pt: pt_1.pt,
|
|
10
|
-
};
|
|
11
|
-
class I18nService {
|
|
12
|
-
getCurrentTranslations() {
|
|
13
|
-
const language = config_service_1.configService.getLanguage();
|
|
14
|
-
return translations[language] || translations.en;
|
|
15
|
-
}
|
|
16
|
-
get t() {
|
|
17
|
-
return this.getCurrentTranslations();
|
|
18
|
-
}
|
|
19
|
-
format(template, params) {
|
|
20
|
-
return template.replace(/{(\w+)}/g, (_, key) => {
|
|
21
|
-
return params[key]?.toString() ?? `{${key}}`;
|
|
22
|
-
});
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
exports.i18n = new I18nService();
|
|
26
|
-
//# sourceMappingURL=index.js.map
|
package/dist/i18n/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AACrE,0CAAuC;AACvC,0CAAuC;AAIvC,MAAM,YAAY,GAAsC;IACtD,EAAE,EAAF,OAAE;IACF,EAAE,EAAF,OAAE;CACH,CAAC;AAEF,MAAM,WAAW;IACP,sBAAsB;QAC5B,MAAM,QAAQ,GAAG,8BAAa,CAAC,WAAW,EAAE,CAAC;QAC7C,OAAO,YAAY,CAAC,QAAQ,CAAC,IAAI,YAAY,CAAC,EAAE,CAAC;IACnD,CAAC;IAED,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,sBAAsB,EAAE,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,QAAgB,EAAE,MAAuC;QAC9D,OAAO,QAAQ,CAAC,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,EAAE;YAC7C,OAAO,MAAM,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,IAAI,IAAI,GAAG,GAAG,CAAC;QAC/C,CAAC,CAAC,CAAC;IACL,CAAC;CACF;AAEY,QAAA,IAAI,GAAG,IAAI,WAAW,EAAE,CAAC"}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
export declare const en: {
|
|
2
|
-
notAuthenticated: string;
|
|
3
|
-
operationCancelled: string;
|
|
4
|
-
auth: {
|
|
5
|
-
loginSuccess: string;
|
|
6
|
-
loginFailed: string;
|
|
7
|
-
logoutSuccess: string;
|
|
8
|
-
tokenSet: string;
|
|
9
|
-
tokenRequired: string;
|
|
10
|
-
keyRequired: string;
|
|
11
|
-
invalidKey: string;
|
|
12
|
-
currentUser: string;
|
|
13
|
-
notLoggedIn: string;
|
|
14
|
-
configPath: string;
|
|
15
|
-
currentConfig: string;
|
|
16
|
-
};
|
|
17
|
-
prompts: {
|
|
18
|
-
fetchingPrompts: string;
|
|
19
|
-
fetchingPrompt: string;
|
|
20
|
-
noPromptsFound: string;
|
|
21
|
-
promptNotFound: string;
|
|
22
|
-
pagination: string;
|
|
23
|
-
};
|
|
24
|
-
files: {
|
|
25
|
-
addingFiles: string;
|
|
26
|
-
filesAdded: string;
|
|
27
|
-
noFilesAdded: string;
|
|
28
|
-
fileNotFound: string;
|
|
29
|
-
trackedFiles: string;
|
|
30
|
-
noTrackedFiles: string;
|
|
31
|
-
filesCleared: string;
|
|
32
|
-
fileRemoved: string;
|
|
33
|
-
fileNotTracked: string;
|
|
34
|
-
confirmClear: string;
|
|
35
|
-
status: string;
|
|
36
|
-
exists: string;
|
|
37
|
-
missing: string;
|
|
38
|
-
ignored: string;
|
|
39
|
-
ignoredFiles: string;
|
|
40
|
-
};
|
|
41
|
-
execute: {
|
|
42
|
-
executing: string;
|
|
43
|
-
noPromptId: string;
|
|
44
|
-
noFilesTracked: string;
|
|
45
|
-
executionComplete: string;
|
|
46
|
-
executionFailed: string;
|
|
47
|
-
};
|
|
48
|
-
debug: {
|
|
49
|
-
enabled: string;
|
|
50
|
-
disabled: string;
|
|
51
|
-
status: string;
|
|
52
|
-
on: string;
|
|
53
|
-
off: string;
|
|
54
|
-
};
|
|
55
|
-
language: {
|
|
56
|
-
current: string;
|
|
57
|
-
changed: string;
|
|
58
|
-
invalid: string;
|
|
59
|
-
available: string;
|
|
60
|
-
english: string;
|
|
61
|
-
portuguese: string;
|
|
62
|
-
};
|
|
63
|
-
errors: {
|
|
64
|
-
unknown: string;
|
|
65
|
-
network: string;
|
|
66
|
-
unauthorized: string;
|
|
67
|
-
forbidden: string;
|
|
68
|
-
notFound: string;
|
|
69
|
-
serverError: string;
|
|
70
|
-
timeout: string;
|
|
71
|
-
};
|
|
72
|
-
table: {
|
|
73
|
-
field: string;
|
|
74
|
-
value: string;
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
email: string;
|
|
78
|
-
role: string;
|
|
79
|
-
customerId: string;
|
|
80
|
-
customerName: string;
|
|
81
|
-
active: string;
|
|
82
|
-
createdAt: string;
|
|
83
|
-
updatedAt: string;
|
|
84
|
-
path: string;
|
|
85
|
-
size: string;
|
|
86
|
-
addedAt: string;
|
|
87
|
-
temperature: string;
|
|
88
|
-
shortDescription: string;
|
|
89
|
-
yes: string;
|
|
90
|
-
no: string;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=en.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../../src/i18n/translations/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Gd,CAAC"}
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.en = void 0;
|
|
4
|
-
exports.en = {
|
|
5
|
-
// General
|
|
6
|
-
notAuthenticated: 'Not authenticated. Please run: sphereai auth login <key>',
|
|
7
|
-
operationCancelled: 'Operation cancelled',
|
|
8
|
-
// Auth commands
|
|
9
|
-
auth: {
|
|
10
|
-
loginSuccess: 'Successfully authenticated!',
|
|
11
|
-
loginFailed: 'Authentication failed',
|
|
12
|
-
logoutSuccess: 'Successfully logged out',
|
|
13
|
-
tokenSet: 'Token set successfully',
|
|
14
|
-
tokenRequired: 'Token is required',
|
|
15
|
-
keyRequired: 'UserChannelKey is required',
|
|
16
|
-
invalidKey: 'Invalid UserChannelKey',
|
|
17
|
-
currentUser: 'Current user:',
|
|
18
|
-
notLoggedIn: 'Not logged in',
|
|
19
|
-
configPath: 'Configuration file:',
|
|
20
|
-
currentConfig: 'Current configuration:',
|
|
21
|
-
},
|
|
22
|
-
// Prompts commands
|
|
23
|
-
prompts: {
|
|
24
|
-
fetchingPrompts: 'Fetching prompts...',
|
|
25
|
-
fetchingPrompt: 'Fetching prompt details...',
|
|
26
|
-
noPromptsFound: 'No prompts found',
|
|
27
|
-
promptNotFound: 'Prompt not found',
|
|
28
|
-
pagination: 'Page {page} of {totalPages} (Total: {total} prompts)',
|
|
29
|
-
},
|
|
30
|
-
// Files commands
|
|
31
|
-
files: {
|
|
32
|
-
addingFiles: 'Adding files...',
|
|
33
|
-
filesAdded: '{count} file(s) added to tracking',
|
|
34
|
-
noFilesAdded: 'No files were added',
|
|
35
|
-
fileNotFound: 'File not found: {path}',
|
|
36
|
-
trackedFiles: 'Tracked files:',
|
|
37
|
-
noTrackedFiles: 'No files are being tracked',
|
|
38
|
-
filesCleared: 'All tracked files cleared',
|
|
39
|
-
fileRemoved: 'Removed {path} from tracking',
|
|
40
|
-
fileNotTracked: 'File is not being tracked: {path}',
|
|
41
|
-
confirmClear: 'Are you sure you want to clear all tracked files?',
|
|
42
|
-
status: 'Status',
|
|
43
|
-
exists: 'Exists',
|
|
44
|
-
missing: 'Missing',
|
|
45
|
-
ignored: 'Ignored',
|
|
46
|
-
ignoredFiles: 'Currently ignored patterns:',
|
|
47
|
-
},
|
|
48
|
-
// Execute commands
|
|
49
|
-
execute: {
|
|
50
|
-
executing: 'Executing command...',
|
|
51
|
-
noPromptId: 'Prompt ID is required',
|
|
52
|
-
noFilesTracked: 'No files are being tracked. Use "sphereai files add" first.',
|
|
53
|
-
executionComplete: 'Execution complete',
|
|
54
|
-
executionFailed: 'Execution failed',
|
|
55
|
-
},
|
|
56
|
-
// Debug commands
|
|
57
|
-
debug: {
|
|
58
|
-
enabled: 'Debug mode enabled',
|
|
59
|
-
disabled: 'Debug mode disabled',
|
|
60
|
-
status: 'Debug mode is currently: {status}',
|
|
61
|
-
on: 'ON',
|
|
62
|
-
off: 'OFF',
|
|
63
|
-
},
|
|
64
|
-
// Language commands
|
|
65
|
-
language: {
|
|
66
|
-
current: 'Current language: {language}',
|
|
67
|
-
changed: 'Language changed to: {language}',
|
|
68
|
-
invalid: 'Invalid language. Available options: en, pt',
|
|
69
|
-
available: 'Available languages:',
|
|
70
|
-
english: 'English',
|
|
71
|
-
portuguese: 'Portuguese',
|
|
72
|
-
},
|
|
73
|
-
// Errors
|
|
74
|
-
errors: {
|
|
75
|
-
unknown: 'An unknown error occurred',
|
|
76
|
-
network: 'Network error. Please check your connection.',
|
|
77
|
-
unauthorized: 'Unauthorized. Please login again.',
|
|
78
|
-
forbidden: 'Access forbidden',
|
|
79
|
-
notFound: 'Resource not found',
|
|
80
|
-
serverError: 'Server error. Please try again later.',
|
|
81
|
-
timeout: 'Request timeout. Please try again.',
|
|
82
|
-
},
|
|
83
|
-
// Table headers
|
|
84
|
-
table: {
|
|
85
|
-
field: 'Field',
|
|
86
|
-
value: 'Value',
|
|
87
|
-
id: 'ID',
|
|
88
|
-
name: 'Name',
|
|
89
|
-
email: 'Email',
|
|
90
|
-
role: 'Role',
|
|
91
|
-
customerId: 'Customer ID',
|
|
92
|
-
customerName: 'Customer Name',
|
|
93
|
-
active: 'Active',
|
|
94
|
-
createdAt: 'Created At',
|
|
95
|
-
updatedAt: 'Updated At',
|
|
96
|
-
path: 'Path',
|
|
97
|
-
size: 'Size',
|
|
98
|
-
addedAt: 'Added At',
|
|
99
|
-
temperature: 'Temperature',
|
|
100
|
-
shortDescription: 'Short Description',
|
|
101
|
-
yes: 'Yes',
|
|
102
|
-
no: 'No',
|
|
103
|
-
},
|
|
104
|
-
};
|
|
105
|
-
//# sourceMappingURL=en.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"en.js","sourceRoot":"","sources":["../../../src/i18n/translations/en.ts"],"names":[],"mappings":";;;AAAa,QAAA,EAAE,GAAG;IAChB,UAAU;IACV,gBAAgB,EAAE,0DAA0D;IAC5E,kBAAkB,EAAE,qBAAqB;IAEzC,gBAAgB;IAChB,IAAI,EAAE;QACJ,YAAY,EAAE,6BAA6B;QAC3C,WAAW,EAAE,uBAAuB;QACpC,aAAa,EAAE,yBAAyB;QACxC,QAAQ,EAAE,wBAAwB;QAClC,aAAa,EAAE,mBAAmB;QAClC,WAAW,EAAE,4BAA4B;QACzC,UAAU,EAAE,wBAAwB;QACpC,WAAW,EAAE,eAAe;QAC5B,WAAW,EAAE,eAAe;QAC5B,UAAU,EAAE,qBAAqB;QACjC,aAAa,EAAE,wBAAwB;KACxC;IAED,mBAAmB;IACnB,OAAO,EAAE;QACP,eAAe,EAAE,qBAAqB;QACtC,cAAc,EAAE,4BAA4B;QAC5C,cAAc,EAAE,kBAAkB;QAClC,cAAc,EAAE,kBAAkB;QAClC,UAAU,EAAE,sDAAsD;KACnE;IAED,iBAAiB;IACjB,KAAK,EAAE;QACL,WAAW,EAAE,iBAAiB;QAC9B,UAAU,EAAE,mCAAmC;QAC/C,YAAY,EAAE,qBAAqB;QACnC,YAAY,EAAE,wBAAwB;QACtC,YAAY,EAAE,gBAAgB;QAC9B,cAAc,EAAE,4BAA4B;QAC5C,YAAY,EAAE,2BAA2B;QACzC,WAAW,EAAE,8BAA8B;QAC3C,cAAc,EAAE,mCAAmC;QACnD,YAAY,EAAE,mDAAmD;QACjE,MAAM,EAAE,QAAQ;QAChB,MAAM,EAAE,QAAQ;QAChB,OAAO,EAAE,SAAS;QAClB,OAAO,EAAE,SAAS;QAClB,YAAY,EAAE,6BAA6B;KAC5C;IAED,mBAAmB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 -1,93 +0,0 @@
|
|
|
1
|
-
export declare const pt: {
|
|
2
|
-
notAuthenticated: string;
|
|
3
|
-
operationCancelled: string;
|
|
4
|
-
auth: {
|
|
5
|
-
loginSuccess: string;
|
|
6
|
-
loginFailed: string;
|
|
7
|
-
logoutSuccess: string;
|
|
8
|
-
tokenSet: string;
|
|
9
|
-
tokenRequired: string;
|
|
10
|
-
keyRequired: string;
|
|
11
|
-
invalidKey: string;
|
|
12
|
-
currentUser: string;
|
|
13
|
-
notLoggedIn: string;
|
|
14
|
-
configPath: string;
|
|
15
|
-
currentConfig: string;
|
|
16
|
-
};
|
|
17
|
-
prompts: {
|
|
18
|
-
fetchingPrompts: string;
|
|
19
|
-
fetchingPrompt: string;
|
|
20
|
-
noPromptsFound: string;
|
|
21
|
-
promptNotFound: string;
|
|
22
|
-
pagination: string;
|
|
23
|
-
};
|
|
24
|
-
files: {
|
|
25
|
-
addingFiles: string;
|
|
26
|
-
filesAdded: string;
|
|
27
|
-
noFilesAdded: string;
|
|
28
|
-
fileNotFound: string;
|
|
29
|
-
trackedFiles: string;
|
|
30
|
-
noTrackedFiles: string;
|
|
31
|
-
filesCleared: string;
|
|
32
|
-
fileRemoved: string;
|
|
33
|
-
fileNotTracked: string;
|
|
34
|
-
confirmClear: string;
|
|
35
|
-
status: string;
|
|
36
|
-
exists: string;
|
|
37
|
-
missing: string;
|
|
38
|
-
ignored: string;
|
|
39
|
-
ignoredFiles: string;
|
|
40
|
-
};
|
|
41
|
-
execute: {
|
|
42
|
-
executing: string;
|
|
43
|
-
noPromptId: string;
|
|
44
|
-
noFilesTracked: string;
|
|
45
|
-
executionComplete: string;
|
|
46
|
-
executionFailed: string;
|
|
47
|
-
};
|
|
48
|
-
debug: {
|
|
49
|
-
enabled: string;
|
|
50
|
-
disabled: string;
|
|
51
|
-
status: string;
|
|
52
|
-
on: string;
|
|
53
|
-
off: string;
|
|
54
|
-
};
|
|
55
|
-
language: {
|
|
56
|
-
current: string;
|
|
57
|
-
changed: string;
|
|
58
|
-
invalid: string;
|
|
59
|
-
available: string;
|
|
60
|
-
english: string;
|
|
61
|
-
portuguese: string;
|
|
62
|
-
};
|
|
63
|
-
errors: {
|
|
64
|
-
unknown: string;
|
|
65
|
-
network: string;
|
|
66
|
-
unauthorized: string;
|
|
67
|
-
forbidden: string;
|
|
68
|
-
notFound: string;
|
|
69
|
-
serverError: string;
|
|
70
|
-
timeout: string;
|
|
71
|
-
};
|
|
72
|
-
table: {
|
|
73
|
-
field: string;
|
|
74
|
-
value: string;
|
|
75
|
-
id: string;
|
|
76
|
-
name: string;
|
|
77
|
-
email: string;
|
|
78
|
-
role: string;
|
|
79
|
-
customerId: string;
|
|
80
|
-
customerName: string;
|
|
81
|
-
active: string;
|
|
82
|
-
createdAt: string;
|
|
83
|
-
updatedAt: string;
|
|
84
|
-
path: string;
|
|
85
|
-
size: string;
|
|
86
|
-
addedAt: string;
|
|
87
|
-
temperature: string;
|
|
88
|
-
shortDescription: string;
|
|
89
|
-
yes: string;
|
|
90
|
-
no: string;
|
|
91
|
-
};
|
|
92
|
-
};
|
|
93
|
-
//# sourceMappingURL=pt.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pt.d.ts","sourceRoot":"","sources":["../../../src/i18n/translations/pt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4Gd,CAAC"}
|