decord/source/modules/vibegrations/native/VibegrationsModelSettingsSheet.tsx
github-actions 20a21ad13f chore: update source for alpha 346.5
Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4791.js (118.4 MB)
2026-09-11 19:12:58 +00:00

153 lines
6 KiB
TypeScript

// Module ID: 16676
// Function ID: 16677
// Name: VibegrationsModelSettingsSheet
// Dependencies: [109, 19, 16666, 21, 504, 16677, 1114, 3590, 7270, 7222, 6698, 5024, 576, 5736, 5739, 16678, 5738, 7273, 4602, 2]
// Exports: default
// Module 16676 (VibegrationsModelSettingsSheet)
import VibegrationsEffortPresets from "VibegrationsEffortPresets" /* 16677 */;
import _objectWithoutProperties from "_objectWithoutProperties" /* 109 */;
import noop from "module_19" /* 19 */;
import VibegrationsConnectionStore from "VibegrationsConnectionStore" /* 16666 */;
const require = globalThis.__r;
require = fn;
let closure_3 = ["fast"];
const sendModelSettings = fn(16666).sendModelSettings;
const jsxProd = fn(21);
({ jsx: closure_8, jsxs: closure_9 } = jsxProd);
const size = fn(2);
const result = size.fileFinishedImporting("modules/vibegrations/native/VibegrationsModelSettingsSheet.tsx");
export default function VibegrationsModelSettingsSheet(projectId) {
projectId = projectId.projectId;
let settings;
const items = [VibegrationsConnectionStore];
const items1 = [projectId];
const stateFromStores = projectId(settings[4]).useStateFromStores(items, () => VibegrationsConnectionStore.getModelSettings(projectId), items1);
const items2 = [projectId];
importDefault = noop.useCallback((fn) => {
const modelSettings = VibegrationsConnectionStore.getModelSettings(projectId);
if (null != modelSettings) {
const tmp12 = fn(modelSettings.settings.main);
const model = tmp12;
const tmp16 = _objectWithoutProperties(tmp12, closure_3);
const main = modelSettings.choices.main;
const found = main.find((id) => id.id === model.model);
if (found != null) {
const supports_fast = found.supports_fast;
}
try {
let tmp6 = tmp16;
if (true === tmp13) {
tmp6 = tmp16;
if (true === supports_fast) {
const obj2 = {};
const merged = Object.assign(tmp16);
obj2.fast = true;
tmp6 = obj2;
}
}
sendModelSettings(projectId, VibegrationsEffortPresets.vibegrationsSettingsForTier(tmp6));
} catch (err) {
}
}
}, items2);
if (null == stateFromStores) {
return null;
} else {
settings = stateFromStores.settings;
const choices = stateFromStores.choices;
const intl2 = tmp(tmp2[6]).intl;
const stringResult = intl2.string(require("module_3590")["9FRudW"]);
const intl3 = tmp(tmp2[6]).intl;
const stringResult1 = intl3.string(require("module_3590")["4AsQHS"]);
let obj2 = { scrollable: true, header: null, children: null };
const obj3 = { title: null };
const intl4 = tmp(tmp2[6]).intl;
obj3.title = intl4.string(require("module_3590")["2NWMqY"]);
obj2.header = closure_8(tmp(tmp2[9]).BottomSheetTitleHeader, obj3);
const obj4 = { direction: "vertical", spacing: require("native").space.PX_16, children: null };
const obj5 = {
hasIcons: false,
defaultValue: settings.main.model,
onChange(model) {
return closure_1((arg0) => {
const obj = {};
const merged = Object.assign(arg0);
obj.model = model;
return obj;
});
},
title: stringResult,
accessibilityLabel: stringResult,
children: null
};
let main = choices.main;
obj5.children = main.map((label) => closure_1_8(projectId(settings[14]).TableRadioRow, { label: label.label, subLabel: projectId(settings[15]).PROVIDER_LABELS[label.provider], value: label.id }, label.id));
const items3 = [closure_8(tmp(tmp2[13]).TableRadioGroup, obj5), , , ];
const obj6 = {
hasIcons: false,
defaultValue: settings.main.thinking,
onChange(thinking) {
return closure_1((arg0) => {
const obj = {};
const merged = Object.assign(arg0);
obj.thinking = thinking;
return obj;
});
},
title: stringResult1,
accessibilityLabel: stringResult1,
children: null
};
let thinking = choices.thinking;
obj6.children = thinking.map((value) => {
let tmp2 = projectId(settings[15]).THINKING_LABELS[value];
if (tmp2 == null) {
tmp2 = value;
}
return closure_1_8(projectId(settings[14]).TableRadioRow, { label: tmp2, value }, value);
});
items3[1] = closure_8(tmp(tmp2[13]).TableRadioGroup, obj6);
const main1 = choices.main;
let found = main1.find((id) => id.id === settings.main.model);
let supports_fast;
if (found != null) {
supports_fast = found.supports_fast;
}
let tmp9Result = null;
if (true === supports_fast) {
const obj7 = { hasIcons: false, children: null };
const obj8 = { label: null, subLabel: null, value: null, onValueChange: null };
const intl5 = tmp(tmp2[6]).intl;
obj8.label = intl5.string(tmp6(tmp2[7]).SYLSgx);
const intl6 = tmp(tmp2[6]).intl;
obj8.subLabel = intl6.string(tmp6(tmp2[7]).HITWAI);
obj8.value = true === settings.main.fast;
obj8.onValueChange = function onValueChange(fast) {
return closure_1((arg0) => {
const obj = {};
const merged = Object.assign(arg0);
obj.fast = fast;
return obj;
});
};
obj7.children = tmp9(tmp(tmp2[17]).TableSwitchRow, obj8);
tmp9Result = tmp9(tmp(tmp2[16]).TableRowGroup, obj7);
}
const obj9 = { children: null };
items3[2] = tmp9Result;
const obj10 = { variant: "text-xs/normal", color: "text-muted", children: null };
const intl = tmp(tmp2[6]).intl;
obj10.children = intl.string(require("module_3590").ICU5aW);
items3[3] = closure_8(tmp(tmp2[18]).Text, obj10);
obj4.children = items3;
obj9.children = closure_9(tmp(tmp2[11]).Stack, obj4);
obj2.children = closure_8(tmp(tmp2[10]).BottomSheetScrollView, obj9);
return closure_8(tmp(tmp2[8]).ActionSheet, obj2);
}
let obj = projectId(settings[4]);
};
export const VIBEGRATIONS_MODEL_SETTINGS_SHEET_KEY = "VibegrationsModelSettingsSheet";