| @@ -874,25 +874,10 @@ | ||
| 874 | 874 | $('#mxchat_pinecone_docs_switch_anyway').prop('checked', false); |
| 875 | 875 | } |
| 876 | 876 | $submit.prop('disabled', blocked); |
| 877 | 877 | } |
| 878 | - // 47c61f: the status notice follows the host in the FIELD, the same | |
| 879 | - // comparison the Save gate makes. The server paints it from the saved | |
| 880 | - // host, which is the classic index for the whole length of a copy, so a | |
| 881 | - // checked document host typed here used to sit under "Not checked yet". | |
| 882 | - // Kept out of refreshGate(): a failed Check sets its own text first and | |
| 883 | - // then calls refreshGate(), and that text must survive until the host changes. | |
| 884 | - function refreshStatus() { | |
| 885 | - var typed = hostValue(); | |
| 886 | - if (typed !== '' && typed === verifiedHost) { | |
| 887 | - var dim = parseInt(state.expected_dimension, 10) || 0; | |
| 888 | - setStatus(true, String(state.status_checked || 'Document index checked: %1$s (%2$d dimensions).').replace('%1$s', typed).replace('%2$d', dim)); | |
| 889 | - } else { | |
| 890 | - setStatus(false, String(state.status_unchecked || 'Not checked yet. Create a document index below, or enter its host above and click Check index. The index type only saves once the host has been checked.')); | |
| 891 | - } | |
| 892 | - } | |
| 893 | 878 | $('#mxchat_pinecone_docs_switch_anyway').off('change.pineconeDocs').on('change.pineconeDocs', refreshGate); |
| 894 | - $('#mxchat_pinecone_host').off('input.pineconeDocs change.pineconeDocs').on('input.pineconeDocs change.pineconeDocs', function () { refreshStatus(); refreshGate(); }); | |
| 879 | + $('#mxchat_pinecone_host').off('input.pineconeDocs change.pineconeDocs').on('input.pineconeDocs change.pineconeDocs', refreshGate); | |
| 895 | 880 | |
| 896 | 881 | function post(data) { |
| 897 | 882 | data.nonce = nonce; |
| 898 | 883 | return $.post(ajaxUrl, data); |
| @@ -1040,21 +1025,10 @@ | ||
| 1040 | 1025 | return Math.max(0, total - copied); |
| 1041 | 1026 | } |
| 1042 | 1027 | function otherNamespacesText(st) { |
| 1043 | 1028 | var other = st.other_namespaces || {}; |
| 1044 | - // 47c61f: default namespace first, then by name. The server writes them | |
| 1045 | - // in that order now; this covers states written before it did, and | |
| 1046 | - // namespaces named like numbers, which a JSON object reorders. | |
| 1047 | - var names = []; | |
| 1048 | - $.each(other, function (name) { names.push(String(name)); }); | |
| 1049 | - names.sort(function (a, b) { | |
| 1050 | - if (a === b) { return 0; } | |
| 1051 | - if (a === '__default__') { return -1; } | |
| 1052 | - if (b === '__default__') { return 1; } | |
| 1053 | - return a < b ? -1 : 1; | |
| 1054 | - }); | |
| 1055 | 1029 | var parts = []; |
| 1056 | - $.each(names, function (i, name) { parts.push(name + ' (' + fmt(other[name]) + ')'); }); | |
| 1030 | + $.each(other, function (name, count) { parts.push(name + ' (' + fmt(count) + ')'); }); | |
| 1057 | 1031 | return parts.join(', '); |
| 1058 | 1032 | } |
| 1059 | 1033 | function otherNamespacesSummary(st) { |
| 1060 | 1034 | var records = 0, n = 0; |