@tiagojct/subsub 0.11.2 → 0.11.3
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/config.js +1 -1
- package/dist/init.js +7 -6
- package/package.json +1 -1
- package/src/config.ts +1 -1
- package/src/init.ts +12 -11
- package/web/app.js +4 -2
- package/web/i18n.js +6 -2
package/dist/config.js
CHANGED
|
@@ -33,7 +33,7 @@ export const DEFAULT_MODELS = {
|
|
|
33
33
|
};
|
|
34
34
|
export const PROFILES = ["reader", "scholar", "author", "editor"];
|
|
35
35
|
/** The Zotero server release that this Sub-Sub version runs when there is no local server folder. */
|
|
36
|
-
export const SERVER_VERSION = "0.5.
|
|
36
|
+
export const SERVER_VERSION = "0.5.3";
|
|
37
37
|
/** The Starbuck release (PyPI) that this Sub-Sub version runs when there is no local Starbuck folder. */
|
|
38
38
|
export const STARBUCK_VERSION = "0.2.0";
|
|
39
39
|
export const STARBUCK_SOURCE = `starbuck==${STARBUCK_VERSION}`;
|
package/dist/init.js
CHANGED
|
@@ -88,12 +88,6 @@ export async function runInit(io, flags, env = process.env, deps = {}) {
|
|
|
88
88
|
io.say("");
|
|
89
89
|
io.say(`${title}. ${text}`);
|
|
90
90
|
};
|
|
91
|
-
explain("Setup", "Standard works for any field. FMUP / U.Porto starts with health-sciences tags and the Reader profile.");
|
|
92
|
-
const setup = await io.choose("Setup", [
|
|
93
|
-
{ value: "standard", label: "Standard" },
|
|
94
|
-
{ value: "fmup", label: "FMUP / U.Porto: health-sciences tags, Reader profile (the FMUP model service is coming soon)" },
|
|
95
|
-
], flags.setup ?? existing.setup ?? "standard");
|
|
96
|
-
const fmup = setup === "fmup";
|
|
97
91
|
explain("About you", "Sub-Sub uses your name and one line about you in its replies. Both are optional and stay on this computer, except in the messages to the model provider.");
|
|
98
92
|
const userName = (await io.ask("Your name (Enter for none)", flags.name ?? existing.userName ?? "")).trim();
|
|
99
93
|
const about = (await io.ask('One line about you, e.g. "a master\'s student in health informatics" (optional)', flags.about ?? existing.about ?? "")).trim();
|
|
@@ -130,6 +124,13 @@ export async function runInit(io, flags, env = process.env, deps = {}) {
|
|
|
130
124
|
io.say(`Sub-Sub keeps using ${notes}.`);
|
|
131
125
|
}
|
|
132
126
|
}
|
|
127
|
+
// Asked here, not first: it only changes the defaults of the next two questions.
|
|
128
|
+
explain("Faculty of Medicine, Porto", "Sub-Sub has a set-up for the Faculty of Medicine of the University of Porto (FMUP): health-sciences tags and the Reader profile. Everyone else keeps the standard set-up.");
|
|
129
|
+
const setup = await io.choose("Set-up", [
|
|
130
|
+
{ value: "standard", label: "Standard (any field, any institution)" },
|
|
131
|
+
{ value: "fmup", label: "FMUP / U.Porto: health-sciences tags, Reader profile (the FMUP model service is coming soon)" },
|
|
132
|
+
], flags.setup ?? existing.setup ?? "standard");
|
|
133
|
+
const fmup = setup === "fmup";
|
|
133
134
|
explain("Profile", "The profile sets how much Sub-Sub writes for you and which tools it offers. Change it at any time with /profile.");
|
|
134
135
|
const profileDefault = flags.profile ?? existing.profile ?? (fmup ? "reader" : "scholar");
|
|
135
136
|
const profile = await io.choose("Profile", PROFILES.map((p) => ({ value: p, label: `${PROFILE_SPECS[p].label}: ${PROFILE_SPECS[p].summary}` })), isProfile(profileDefault) ? profileDefault : "scholar");
|
package/package.json
CHANGED
package/src/config.ts
CHANGED
|
@@ -39,7 +39,7 @@ export type Profile = "reader" | "scholar" | "author" | "editor";
|
|
|
39
39
|
export const PROFILES: Profile[] = ["reader", "scholar", "author", "editor"];
|
|
40
40
|
|
|
41
41
|
/** The Zotero server release that this Sub-Sub version runs when there is no local server folder. */
|
|
42
|
-
export const SERVER_VERSION = "0.5.
|
|
42
|
+
export const SERVER_VERSION = "0.5.3";
|
|
43
43
|
|
|
44
44
|
/** The Starbuck release (PyPI) that this Sub-Sub version runs when there is no local Starbuck folder. */
|
|
45
45
|
export const STARBUCK_VERSION = "0.2.0";
|
package/src/init.ts
CHANGED
|
@@ -128,17 +128,6 @@ export async function runInit(
|
|
|
128
128
|
io.say(`${title}. ${text}`);
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
explain("Setup", "Standard works for any field. FMUP / U.Porto starts with health-sciences tags and the Reader profile.");
|
|
132
|
-
const setup = await io.choose(
|
|
133
|
-
"Setup",
|
|
134
|
-
[
|
|
135
|
-
{ value: "standard", label: "Standard" },
|
|
136
|
-
{ value: "fmup", label: "FMUP / U.Porto: health-sciences tags, Reader profile (the FMUP model service is coming soon)" },
|
|
137
|
-
],
|
|
138
|
-
flags.setup ?? existing.setup ?? "standard",
|
|
139
|
-
);
|
|
140
|
-
const fmup = setup === "fmup";
|
|
141
|
-
|
|
142
131
|
explain("About you", "Sub-Sub uses your name and one line about you in its replies. Both are optional and stay on this computer, except in the messages to the model provider.");
|
|
143
132
|
const userName = (await io.ask("Your name (Enter for none)", flags.name ?? existing.userName ?? "")).trim();
|
|
144
133
|
const about = (await io.ask('One line about you, e.g. "a master\'s student in health informatics" (optional)', flags.about ?? existing.about ?? "")).trim();
|
|
@@ -184,6 +173,18 @@ export async function runInit(
|
|
|
184
173
|
}
|
|
185
174
|
}
|
|
186
175
|
|
|
176
|
+
// Asked here, not first: it only changes the defaults of the next two questions.
|
|
177
|
+
explain("Faculty of Medicine, Porto", "Sub-Sub has a set-up for the Faculty of Medicine of the University of Porto (FMUP): health-sciences tags and the Reader profile. Everyone else keeps the standard set-up.");
|
|
178
|
+
const setup = await io.choose(
|
|
179
|
+
"Set-up",
|
|
180
|
+
[
|
|
181
|
+
{ value: "standard", label: "Standard (any field, any institution)" },
|
|
182
|
+
{ value: "fmup", label: "FMUP / U.Porto: health-sciences tags, Reader profile (the FMUP model service is coming soon)" },
|
|
183
|
+
],
|
|
184
|
+
flags.setup ?? existing.setup ?? "standard",
|
|
185
|
+
);
|
|
186
|
+
const fmup = setup === "fmup";
|
|
187
|
+
|
|
187
188
|
explain("Profile", "The profile sets how much Sub-Sub writes for you and which tools it offers. Change it at any time with /profile.");
|
|
188
189
|
const profileDefault = flags.profile ?? existing.profile ?? (fmup ? "reader" : "scholar");
|
|
189
190
|
const profile = await io.choose(
|
package/web/app.js
CHANGED
|
@@ -207,8 +207,10 @@ function renderHeader() {
|
|
|
207
207
|
txt.textContent += ` · ${t("serversDown", { x: state.down.join(", ") })}`;
|
|
208
208
|
lib.classList.add("down");
|
|
209
209
|
}
|
|
210
|
-
lib.title = txt.textContent;
|
|
211
|
-
|
|
210
|
+
lib.title = L?.toReview ? `${txt.textContent}\n${t("toReviewHint")}` : txt.textContent;
|
|
211
|
+
// On a phone the long hint does not fit in the box.
|
|
212
|
+
const narrow = window.matchMedia("(max-width: 560px)").matches;
|
|
213
|
+
$("input").placeholder = narrow ? t("placeholderShort") : mode() === "librarian" ? t("placeholderLibrarian") : t("placeholderResearcher");
|
|
212
214
|
if (log.querySelector(".empty")) {
|
|
213
215
|
clearEmpty();
|
|
214
216
|
renderEmpty();
|
package/web/i18n.js
CHANGED
|
@@ -27,7 +27,8 @@ export const STRINGS = {
|
|
|
27
27
|
zoteroChecking: "Zotero: checking",
|
|
28
28
|
zoteroDown: "Zotero is not running",
|
|
29
29
|
items: "{n} items",
|
|
30
|
-
toReview: "{n} to
|
|
30
|
+
toReview: "{n} to check",
|
|
31
|
+
toReviewHint: "Items that Sub-Sub tagged and that wait for your check (they carry the _agent tag). Select Library overview, or ask Sub-Sub to list them.",
|
|
31
32
|
serversDown: "Not running: {x}",
|
|
32
33
|
working: "Working",
|
|
33
34
|
using: "Using: {x}",
|
|
@@ -89,6 +90,7 @@ export const STRINGS = {
|
|
|
89
90
|
librarianHint: "Manages the library only: tags, imports, metadata, PDFs. No literature search.",
|
|
90
91
|
placeholderResearcher: "Ask about your library or the literature, or type / for commands",
|
|
91
92
|
placeholderLibrarian: "Ask for a change to your library, or type / for commands",
|
|
93
|
+
placeholderShort: "Ask, or type / for commands",
|
|
92
94
|
emptyResearcher: "The Researcher reads your library, searches PubMed, Europe PMC and OpenAlex and writes notes. It also imports, tags and repairs items: every change shows a preview, and nothing changes until you approve it.",
|
|
93
95
|
emptyLibrarian: "The Librarian manages your library: tags, imports, metadata and PDFs. Every change shows a preview, and nothing changes until you approve it. For searches and notes, switch to the Researcher.",
|
|
94
96
|
forBoth: "Use it in both modes",
|
|
@@ -120,7 +122,8 @@ export const STRINGS = {
|
|
|
120
122
|
zoteroChecking: "Zotero: a verificar",
|
|
121
123
|
zoteroDown: "O Zotero não está aberto",
|
|
122
124
|
items: "{n} itens",
|
|
123
|
-
toReview: "{n} por
|
|
125
|
+
toReview: "{n} por verificar",
|
|
126
|
+
toReviewHint: "Itens que o Sub-Sub etiquetou e que esperam a sua verificação (têm a etiqueta _agent). Selecione Resumo da biblioteca, ou peça ao Sub-Sub para os listar.",
|
|
124
127
|
serversDown: "Parados: {x}",
|
|
125
128
|
working: "A trabalhar",
|
|
126
129
|
using: "A usar: {x}",
|
|
@@ -182,6 +185,7 @@ export const STRINGS = {
|
|
|
182
185
|
librarianHint: "Só gere a biblioteca: etiquetas, importações, metadados, PDF. Não pesquisa a literatura.",
|
|
183
186
|
placeholderResearcher: "Pergunte sobre a sua biblioteca ou a literatura, ou escreva / para ver os comandos",
|
|
184
187
|
placeholderLibrarian: "Peça uma alteração à biblioteca, ou escreva / para ver os comandos",
|
|
188
|
+
placeholderShort: "Pergunte, ou escreva / para os comandos",
|
|
185
189
|
emptyResearcher: "O Investigador lê a sua biblioteca, pesquisa na PubMed, Europe PMC e OpenAlex e escreve notas. Também importa, etiqueta e corrige itens: cada alteração mostra uma pré-visualização, e nada muda até a aprovar.",
|
|
186
190
|
emptyLibrarian: "O Bibliotecário gere a sua biblioteca: etiquetas, importações, metadados e PDF. Cada alteração mostra uma pré-visualização, e nada muda até a aprovar. Para pesquisar e escrever notas, mude para o Investigador.",
|
|
187
191
|
forBoth: "Usar nos dois modos",
|