theclawbay 0.3.14 → 0.3.16
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/dist/commands/setup.js +5 -6
- package/package.json +1 -1
package/dist/commands/setup.js
CHANGED
|
@@ -626,11 +626,10 @@ async function writeKiloConfig(params) {
|
|
|
626
626
|
return configPath;
|
|
627
627
|
}
|
|
628
628
|
function traePatchSnippet(params) {
|
|
629
|
-
const
|
|
630
|
-
|
|
631
|
-
: [{ id: params.model.trim() || DEFAULT_TRAE_MODEL, name: modelDisplayName(params.model.trim() || DEFAULT_TRAE_MODEL) }];
|
|
629
|
+
const modelId = params.model.trim() || DEFAULT_TRAE_MODEL;
|
|
630
|
+
const displayName = `TheClawBay ${modelDisplayName(modelId)}`;
|
|
632
631
|
const proxyBaseUrl = `${trimTrailingSlash(params.backendUrl)}/api/codex-auth/v1/proxy/v1`;
|
|
633
|
-
return `async setOriginModelListMapAndCache(e,t=!0){let{userProfile:r}=this.credentialStore.getState(),i=r?.scope!==v9.BYTEDANCE,n={},o
|
|
632
|
+
return `async setOriginModelListMapAndCache(e,t=!0){let{userProfile:r}=this.credentialStore.getState(),i=r?.scope!==v9.BYTEDANCE,n={},o={name:${JSON.stringify(modelId)},display_name:${JSON.stringify(displayName)},multimodal:!0,is_default:!1,custom_config:'{"apply_file_path":true,"enable_invalid_json_hint":true,"is_new_pe":true,"native_function_call":true,"use_v2_process":true}',prompt_max_tokens:64000,context_window_size:{max:[128000],default:64000},is_new:!1,is_beta:null,core_memory_enable_type:"Enable",model_type:"chat_model",builder:null,is_preset:!1,client_connect:!0,provider:"openrouter",icon:{dark:"https://theclawbay.com/favicon.ico",light:"https://theclawbay.com/favicon.ico"},ak:${JSON.stringify(params.apiKey)},base_url:${JSON.stringify(proxyBaseUrl)},is_custom_base_url:!0,status:!0,custom_model_id:${JSON.stringify(TRAE_PATCH_MARKER)},fee_model_level:1,max_mode:!1,is_dollar_max:!1,is_max_default:!1,config_source:MK.Personal,selectable:!0,commercial_info:{manual_usage:0,info:""},max_turns:{default:50,max:50},tags:[],sk:null,auth_type:0,region:null,saas_usage:{max:0,default:null},features:{memory:{enable:!1},cost:{enable:!1,data:{manual_usage:0}},multimodal:{enable:!0},context_windows:{enable:!0,data:{dev_context:64000,max_context:128000,max_context_list:[128000],dev_turns:50,max_turns:50}}}};Object.keys(e).forEach(t=>{let r=[...(e[t]||[])];[Mh.Builder,Mh.SoloCoder].includes(t)&&!M2(r,M1(o))&&r.push(o),!i&&[Mh.SoloCoder,Mh.UIBuilder].includes(t)?n[t]=r?.filter(e=>e.config_source!==MK.Personal)||[]:n[t]=r}),this._modelStore.actions.setOriginModelListMap(n),t&&this._modelStorageService.storeModelListMap(n),this._logService.info("[ModelService.setOriginModelListMapAndCache] personalModels",Object.values(n).flat().filter(e=>e&&e.config_source===MK.Personal).map(e=>e.display_name||e.name))}`;
|
|
634
633
|
}
|
|
635
634
|
async function patchTraeBundle(params) {
|
|
636
635
|
const bundlePath = traeBundlePath();
|
|
@@ -865,8 +864,8 @@ class SetupCommand extends base_command_1.BaseCommand {
|
|
|
865
864
|
const traeDetected = optionalClients.find((client) => client.id === "trae")?.detected ?? false;
|
|
866
865
|
if (selectedOptionalClients.has("trae")) {
|
|
867
866
|
this.log(`- Trae: experimental bundle patch installed (${traeBundlePathPatched})`);
|
|
868
|
-
this.log(`- Trae:
|
|
869
|
-
this.log(`- Trae: restart Trae and select
|
|
867
|
+
this.log(`- Trae: added a TheClawBay custom model to the Trae picker.`);
|
|
868
|
+
this.log(`- Trae: restart Trae and select the TheClawBay model inside Trae to test it.`);
|
|
870
869
|
}
|
|
871
870
|
else if (traeDetected) {
|
|
872
871
|
this.log("- Trae: detected but skipped");
|