encoding-converter-ai 0.2.1 → 0.2.2
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/index.js +4 -8
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5676,16 +5676,14 @@ var ENCODING_PRESETS = [
|
|
|
5676
5676
|
];
|
|
5677
5677
|
function renderConfigInfo(config) {
|
|
5678
5678
|
const lines = [];
|
|
5679
|
-
lines.push(
|
|
5680
|
-
lines.push(
|
|
5681
|
-
lines.push(` \u9ED8\u8BA4\u7F16\u7801\uFF1A${config.defaultEncoding || "\u672A\u8BBE\u7F6E"}`);
|
|
5679
|
+
lines.push(`\u7F6E\u4FE1\u5EA6\u9608\u503C\uFF1A${config.confidenceThreshold}`);
|
|
5680
|
+
lines.push(`\u9ED8\u8BA4\u7F16\u7801\uFF1A${config.defaultEncoding || "\u672A\u8BBE\u7F6E"}`);
|
|
5682
5681
|
if (config.directoryRules && Object.keys(config.directoryRules).length > 0) {
|
|
5683
|
-
lines.push(" \u76EE\u5F55\u89C4\u5219\uFF1A");
|
|
5684
5682
|
for (const [pattern, rule] of Object.entries(config.directoryRules)) {
|
|
5685
|
-
lines.push(
|
|
5683
|
+
lines.push(`${pattern} \u2192 ${rule.defaultEncoding || "\u7EE7\u627F\u9ED8\u8BA4"}`);
|
|
5686
5684
|
}
|
|
5687
5685
|
}
|
|
5688
|
-
p.
|
|
5686
|
+
p.note(lines.join("\n"), "\u5F53\u524D\u914D\u7F6E");
|
|
5689
5687
|
}
|
|
5690
5688
|
async function selectEncodingWithCustom(message, defaultValue) {
|
|
5691
5689
|
if (!process.stdin.isTTY) {
|
|
@@ -5828,7 +5826,6 @@ async function selectEncodingWithCustom(message, defaultValue) {
|
|
|
5828
5826
|
for (let i = 0; i < totalInitialLines; i++) {
|
|
5829
5827
|
stdout.write("\n");
|
|
5830
5828
|
}
|
|
5831
|
-
stdout.write(`\x1B[${totalInitialLines}A`);
|
|
5832
5829
|
render();
|
|
5833
5830
|
});
|
|
5834
5831
|
}
|
|
@@ -5918,7 +5915,6 @@ async function runInstaller() {
|
|
|
5918
5915
|
required: true
|
|
5919
5916
|
}));
|
|
5920
5917
|
if (hasExistingConfig) {
|
|
5921
|
-
p.log.info("\u68C0\u6D4B\u5230\u73B0\u6709\u914D\u7F6E\u6587\u4EF6\uFF0C\u5C06\u52A0\u8F7D\u4E3A\u9ED8\u8BA4\u503C");
|
|
5922
5918
|
renderConfigInfo(existingConfig);
|
|
5923
5919
|
}
|
|
5924
5920
|
const thresholdInput = await cancelable(p.text({
|