@tiagojct/subsub 0.5.0 → 0.6.1
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/README.md +17 -2
- package/assets/icon.icns +0 -0
- package/assets/icon.ico +0 -0
- package/assets/icon.png +0 -0
- package/dist/cli.js +12 -0
- package/dist/config.js +22 -17
- package/dist/init.js +11 -10
- package/dist/shortcut.js +165 -0
- package/dist/subsub.js +40 -0
- package/dist/web.js +702 -0
- package/docs/Subsub.md +13 -0
- package/package.json +5 -3
- package/src/cli.ts +12 -0
- package/src/config.ts +22 -17
- package/src/init.ts +11 -9
- package/src/shortcut.ts +184 -0
- package/src/subsub.ts +38 -0
- package/src/web.ts +710 -0
- package/web/app.css +256 -0
- package/web/app.js +1033 -0
- package/web/fonts/IBMPlexMono.woff2 +0 -0
- package/web/fonts/IBMPlexSans.woff2 +0 -0
- package/web/fonts/IBMPlexSerif.woff2 +0 -0
- package/web/glauca.css +106 -0
- package/web/i18n.js +287 -0
- package/web/icon.svg +1 -0
- package/web/index.html +122 -0
- package/web/vendor/marked.esm.js +78 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/web/glauca.css
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/* Generated from glauca.json. Edit the json, then `make generate`. */
|
|
2
|
+
:root {
|
|
3
|
+
--gl-font-serif: "IBM Plex Serif", "IBM Plex Serif fallback", Georgia, serif;
|
|
4
|
+
--gl-font-sans: "IBM Plex Sans", "IBM Plex Sans fallback", system-ui, sans-serif;
|
|
5
|
+
--gl-font-mono: "IBM Plex Mono", "IBM Plex Mono fallback", ui-monospace, monospace;
|
|
6
|
+
--gl-font-reading: "IBM Plex Sans", "IBM Plex Sans fallback", system-ui, sans-serif;
|
|
7
|
+
--gl-text-xs: 0.64rem;
|
|
8
|
+
--gl-text-sm: 0.8rem;
|
|
9
|
+
--gl-text-base: 1rem;
|
|
10
|
+
--gl-text-lg: 1.25rem;
|
|
11
|
+
--gl-text-xl: 1.563rem;
|
|
12
|
+
--gl-text-2xl: 1.953rem;
|
|
13
|
+
--gl-text-3xl: 2.441rem;
|
|
14
|
+
--gl-text-4xl: 3.052rem;
|
|
15
|
+
--gl-text-display: clamp(2.5rem, 6vw, 4rem);
|
|
16
|
+
--gl-text-poster: clamp(3rem, 10vw, 6.5rem);
|
|
17
|
+
--gl-leading-tight: 1.08;
|
|
18
|
+
--gl-leading-snug: 1.3;
|
|
19
|
+
--gl-leading-normal: 1.55;
|
|
20
|
+
--gl-leading-relaxed: 1.7;
|
|
21
|
+
--gl-weight-regular: 400;
|
|
22
|
+
--gl-weight-medium: 500;
|
|
23
|
+
--gl-weight-semibold: 600;
|
|
24
|
+
--gl-weight-bold: 700;
|
|
25
|
+
--gl-space-0: 0;
|
|
26
|
+
--gl-space-1: 0.25rem;
|
|
27
|
+
--gl-space-2: 0.5rem;
|
|
28
|
+
--gl-space-3: 0.75rem;
|
|
29
|
+
--gl-space-4: 1rem;
|
|
30
|
+
--gl-space-5: 1.25rem;
|
|
31
|
+
--gl-space-6: 1.5rem;
|
|
32
|
+
--gl-space-8: 2rem;
|
|
33
|
+
--gl-space-10: 2.5rem;
|
|
34
|
+
--gl-space-12: 3rem;
|
|
35
|
+
--gl-space-16: 4rem;
|
|
36
|
+
--gl-space-20: 5rem;
|
|
37
|
+
--gl-space-24: 6rem;
|
|
38
|
+
--gl-radius-none: 0;
|
|
39
|
+
--gl-radius-sm: 2px;
|
|
40
|
+
--gl-radius-md: 4px;
|
|
41
|
+
--gl-radius-lg: 6px;
|
|
42
|
+
--gl-radius-pill: 999px;
|
|
43
|
+
--gl-border-width: 1px;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/* Pruina is the light default; Profundum is dark. */
|
|
47
|
+
:root,
|
|
48
|
+
[data-mode="light"],
|
|
49
|
+
[data-theme="light"],
|
|
50
|
+
html[data-theme="light"] {
|
|
51
|
+
--gl-bg: #f0f4f6;
|
|
52
|
+
--gl-surface: #f7fafb;
|
|
53
|
+
--gl-surface-raised: #ffffff;
|
|
54
|
+
--gl-text: #16222a;
|
|
55
|
+
--gl-text-muted: #55646d;
|
|
56
|
+
--gl-border: #cdd7dc;
|
|
57
|
+
--gl-accent: #0b62cf;
|
|
58
|
+
--gl-accent-bright: #007aff;
|
|
59
|
+
--gl-accent-deep: #084b96;
|
|
60
|
+
--gl-on-accent: #f2f7fb;
|
|
61
|
+
--gl-tint-deep: #16303f;
|
|
62
|
+
--gl-tint: #35576b;
|
|
63
|
+
--gl-tint-bright: #3e6d84;
|
|
64
|
+
--gl-tint-pale: #b7cdd6;
|
|
65
|
+
--gl-on-tint: #f2f7fb;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-mode="dark"],
|
|
69
|
+
[data-theme="dark"],
|
|
70
|
+
html[data-theme="dark"] {
|
|
71
|
+
--gl-bg: #10161c;
|
|
72
|
+
--gl-surface: #171f26;
|
|
73
|
+
--gl-surface-raised: #1f2932;
|
|
74
|
+
--gl-text: #e8eef2;
|
|
75
|
+
--gl-text-muted: #8c8c8c;
|
|
76
|
+
--gl-border: #2a3540;
|
|
77
|
+
--gl-accent: #3d97ff;
|
|
78
|
+
--gl-accent-bright: #6cb2ff;
|
|
79
|
+
--gl-accent-deep: #007aff;
|
|
80
|
+
--gl-on-accent: #0b1218;
|
|
81
|
+
--gl-tint-deep: #142430;
|
|
82
|
+
--gl-tint: #2b4356;
|
|
83
|
+
--gl-tint-bright: #4d7391;
|
|
84
|
+
--gl-tint-pale: #93b7c9;
|
|
85
|
+
--gl-on-tint: #0d1720;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@media (prefers-color-scheme: dark) {
|
|
89
|
+
:root:not([data-theme="light"]) {
|
|
90
|
+
--gl-bg: #10161c;
|
|
91
|
+
--gl-surface: #171f26;
|
|
92
|
+
--gl-surface-raised: #1f2932;
|
|
93
|
+
--gl-text: #e8eef2;
|
|
94
|
+
--gl-text-muted: #8c8c8c;
|
|
95
|
+
--gl-border: #2a3540;
|
|
96
|
+
--gl-accent: #3d97ff;
|
|
97
|
+
--gl-accent-bright: #6cb2ff;
|
|
98
|
+
--gl-accent-deep: #007aff;
|
|
99
|
+
--gl-on-accent: #0b1218;
|
|
100
|
+
--gl-tint-deep: #142430;
|
|
101
|
+
--gl-tint: #2b4356;
|
|
102
|
+
--gl-tint-bright: #4d7391;
|
|
103
|
+
--gl-tint-pale: #93b7c9;
|
|
104
|
+
--gl-on-tint: #0d1720;
|
|
105
|
+
}
|
|
106
|
+
}
|
package/web/i18n.js
ADDED
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
// Labels for the web view, in English and European Portuguese. The language
|
|
2
|
+
// follows Sub-Sub's language setting; replies follow it already.
|
|
3
|
+
|
|
4
|
+
export const STRINGS = {
|
|
5
|
+
en: {
|
|
6
|
+
researcher: "Researcher",
|
|
7
|
+
librarian: "Librarian",
|
|
8
|
+
profile: "Profile",
|
|
9
|
+
model: "Model",
|
|
10
|
+
noModel: "No model",
|
|
11
|
+
newConversation: "New conversation",
|
|
12
|
+
actions: "Actions",
|
|
13
|
+
conversations: "Conversations",
|
|
14
|
+
noConversations: "No earlier conversations.",
|
|
15
|
+
send: "Send",
|
|
16
|
+
stop: "Stop",
|
|
17
|
+
placeholderResearcher: "Ask about your library, or type / for commands",
|
|
18
|
+
placeholderLibrarian: "Ask for a change to your library, or type / for commands",
|
|
19
|
+
yes: "Yes",
|
|
20
|
+
no: "No",
|
|
21
|
+
ok: "OK",
|
|
22
|
+
cancel: "Cancel",
|
|
23
|
+
close: "Close",
|
|
24
|
+
apply: "Apply {x}?",
|
|
25
|
+
run: "Run {x}?",
|
|
26
|
+
undo: "Undo this change?",
|
|
27
|
+
write: "Allow writing to {x}?",
|
|
28
|
+
approveHint: "Nothing changes until you select Yes.",
|
|
29
|
+
zoteroChecking: "Zotero: checking",
|
|
30
|
+
zoteroDown: "Zotero is not running",
|
|
31
|
+
items: "{n} items",
|
|
32
|
+
toReview: "{n} to review",
|
|
33
|
+
serversDown: "Not running: {x}",
|
|
34
|
+
working: "Working",
|
|
35
|
+
using: "Using: {x}",
|
|
36
|
+
failed: "failed",
|
|
37
|
+
result: "Result",
|
|
38
|
+
open: "Open",
|
|
39
|
+
stopped: "Stopped.",
|
|
40
|
+
agentExit: "Sub-Sub stopped.",
|
|
41
|
+
startAgain: "Start again",
|
|
42
|
+
disconnected: "Connection lost. Trying again.",
|
|
43
|
+
connectModel: "Connect a model to start.",
|
|
44
|
+
connect: "Connect",
|
|
45
|
+
modelTitle: "Model",
|
|
46
|
+
chooseModel: "Choose a model",
|
|
47
|
+
forBoth: "Use it in both modes",
|
|
48
|
+
noModels: "No models yet. Connect a provider below.",
|
|
49
|
+
connectProvider: "Connect a provider",
|
|
50
|
+
provider: "Provider",
|
|
51
|
+
apiKey: "API key",
|
|
52
|
+
save: "Save",
|
|
53
|
+
getKey: "Get a key",
|
|
54
|
+
keyNote: "The key is saved on this computer, in Sub-Sub's settings folder, and is sent only to that provider.",
|
|
55
|
+
oauthNote: "To sign in through a provider's website (for example with a subscription), open a terminal, type subsub, then /login.",
|
|
56
|
+
saving: "Saving",
|
|
57
|
+
saved: "Saved.",
|
|
58
|
+
busy: "Wait until Sub-Sub finishes.",
|
|
59
|
+
emptyTitle: "What would you like to do?",
|
|
60
|
+
quit: "Close Sub-Sub",
|
|
61
|
+
quitDone: "Sub-Sub is closed. You can close this tab.",
|
|
62
|
+
earlier: "Earlier messages were summarised.",
|
|
63
|
+
menu: "Menu",
|
|
64
|
+
commands: "Commands",
|
|
65
|
+
error: "Error",
|
|
66
|
+
theme: "Theme",
|
|
67
|
+
themeAuto: "System",
|
|
68
|
+
themeLight: "Light",
|
|
69
|
+
themeDark: "Dark",
|
|
70
|
+
themeToggle: "Toggle theme",
|
|
71
|
+
copy: "Copy",
|
|
72
|
+
copied: "Copied!",
|
|
73
|
+
copyNote: "Copy text",
|
|
74
|
+
searchConversations: "Search conversations...",
|
|
75
|
+
export: "Export",
|
|
76
|
+
exportTitle: "Export conversation",
|
|
77
|
+
confirmShortcutHint: "Y to approve, N to decline",
|
|
78
|
+
},
|
|
79
|
+
pt: {
|
|
80
|
+
researcher: "Investigador",
|
|
81
|
+
librarian: "Bibliotecário",
|
|
82
|
+
profile: "Perfil",
|
|
83
|
+
model: "Modelo",
|
|
84
|
+
noModel: "Sem modelo",
|
|
85
|
+
newConversation: "Nova conversa",
|
|
86
|
+
actions: "Ações",
|
|
87
|
+
conversations: "Conversas",
|
|
88
|
+
noConversations: "Ainda não há conversas anteriores.",
|
|
89
|
+
send: "Enviar",
|
|
90
|
+
stop: "Parar",
|
|
91
|
+
placeholderResearcher: "Pergunte sobre a sua biblioteca, ou escreva / para ver os comandos",
|
|
92
|
+
placeholderLibrarian: "Peça uma alteração à biblioteca, ou escreva / para ver os comandos",
|
|
93
|
+
yes: "Sim",
|
|
94
|
+
no: "Não",
|
|
95
|
+
ok: "OK",
|
|
96
|
+
cancel: "Cancelar",
|
|
97
|
+
close: "Fechar",
|
|
98
|
+
apply: "Aplicar {x}?",
|
|
99
|
+
run: "Executar {x}?",
|
|
100
|
+
undo: "Desfazer esta alteração?",
|
|
101
|
+
write: "Permitir escrever em {x}?",
|
|
102
|
+
approveHint: "Nada muda até selecionar Sim.",
|
|
103
|
+
zoteroChecking: "Zotero: a verificar",
|
|
104
|
+
zoteroDown: "O Zotero não está aberto",
|
|
105
|
+
items: "{n} itens",
|
|
106
|
+
toReview: "{n} por rever",
|
|
107
|
+
serversDown: "Parados: {x}",
|
|
108
|
+
working: "A trabalhar",
|
|
109
|
+
using: "A usar: {x}",
|
|
110
|
+
failed: "falhou",
|
|
111
|
+
result: "Resultado",
|
|
112
|
+
open: "Abrir",
|
|
113
|
+
stopped: "Parado.",
|
|
114
|
+
agentExit: "O Sub-Sub parou.",
|
|
115
|
+
startAgain: "Recomeçar",
|
|
116
|
+
disconnected: "Ligação perdida. A tentar de novo.",
|
|
117
|
+
connectModel: "Ligue um modelo para começar.",
|
|
118
|
+
connect: "Ligar",
|
|
119
|
+
modelTitle: "Modelo",
|
|
120
|
+
chooseModel: "Escolha um modelo",
|
|
121
|
+
forBoth: "Usar nos dois modos",
|
|
122
|
+
noModels: "Ainda não há modelos. Ligue um fornecedor abaixo.",
|
|
123
|
+
connectProvider: "Ligar um fornecedor",
|
|
124
|
+
provider: "Fornecedor",
|
|
125
|
+
apiKey: "Chave de API",
|
|
126
|
+
save: "Guardar",
|
|
127
|
+
getKey: "Obter uma chave",
|
|
128
|
+
keyNote: "A chave fica guardada neste computador, na pasta de definições do Sub-Sub, e só é enviada a esse fornecedor.",
|
|
129
|
+
oauthNote: "Para entrar através do site de um fornecedor (por exemplo, com uma subscrição), abra um terminal, escreva subsub e depois /login.",
|
|
130
|
+
saving: "A guardar",
|
|
131
|
+
saved: "Guardado.",
|
|
132
|
+
busy: "Espere que o Sub-Sub termine.",
|
|
133
|
+
emptyTitle: "O que quer fazer?",
|
|
134
|
+
quit: "Fechar o Sub-Sub",
|
|
135
|
+
quitDone: "O Sub-Sub está fechado. Pode fechar este separador.",
|
|
136
|
+
earlier: "As mensagens anteriores foram resumidas.",
|
|
137
|
+
menu: "Menu",
|
|
138
|
+
commands: "Comandos",
|
|
139
|
+
error: "Erro",
|
|
140
|
+
theme: "Tema",
|
|
141
|
+
themeAuto: "Sistema",
|
|
142
|
+
themeLight: "Claro",
|
|
143
|
+
themeDark: "Escuro",
|
|
144
|
+
themeToggle: "Mudar tema",
|
|
145
|
+
copy: "Copiar",
|
|
146
|
+
copied: "Copiado!",
|
|
147
|
+
copyNote: "Copiar texto",
|
|
148
|
+
searchConversations: "Procurar conversas...",
|
|
149
|
+
export: "Exportar",
|
|
150
|
+
exportTitle: "Exportar conversa",
|
|
151
|
+
confirmShortcutHint: "Y para aprovar, N para recusar",
|
|
152
|
+
},
|
|
153
|
+
};
|
|
154
|
+
|
|
155
|
+
/** Buttons in the side panel. `fill` puts the command in the message box; `send` runs it at once. */
|
|
156
|
+
export const ACTIONS = {
|
|
157
|
+
researcher: [
|
|
158
|
+
{ cmd: "subsub", send: true, en: "Library overview", pt: "Resumo da biblioteca" },
|
|
159
|
+
{ cmd: "lit-note", fill: true, en: "Literature note", pt: "Nota de leitura" },
|
|
160
|
+
{ cmd: "synthesis", fill: true, en: "Synthesis", pt: "Síntese" },
|
|
161
|
+
{ cmd: "gaps", fill: true, en: "What is missing", pt: "O que falta" },
|
|
162
|
+
{ cmd: "manuscript", fill: true, en: "Check a manuscript", pt: "Verificar um manuscrito" },
|
|
163
|
+
{ cmd: "alert", send: true, en: "New publications", pt: "Novas publicações" },
|
|
164
|
+
],
|
|
165
|
+
librarian: [
|
|
166
|
+
{ cmd: "subsub", send: true, en: "Library overview", pt: "Resumo da biblioteca" },
|
|
167
|
+
{ cmd: "tag-batch 10", send: true, en: "Tag 10 items", pt: "Etiquetar 10 itens" },
|
|
168
|
+
{ cmd: "clean-tags", send: true, en: "Clean up tags", pt: "Limpar etiquetas" },
|
|
169
|
+
{ cmd: "import-queue", send: true, en: "Import the queue", pt: "Importar a fila" },
|
|
170
|
+
],
|
|
171
|
+
both: [
|
|
172
|
+
{ cmd: "history", send: true, en: "Recent changes", pt: "Alterações recentes" },
|
|
173
|
+
{ cmd: "undo", send: true, en: "Undo the last change", pt: "Desfazer a última alteração" },
|
|
174
|
+
],
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
/** Suggestions on an empty conversation. */
|
|
178
|
+
export const SUGGESTIONS = {
|
|
179
|
+
researcher: {
|
|
180
|
+
en: ["What do I have on ", "Find recent systematic reviews on ", "Which items have no PDF?"],
|
|
181
|
+
pt: ["O que tenho sobre ", "Procure revisões sistemáticas recentes sobre ", "Que itens não têm PDF?"],
|
|
182
|
+
},
|
|
183
|
+
librarian: {
|
|
184
|
+
en: ["Tag the next 10 items without a topic", "Import 10.1136/bmj.n71", "Find duplicates"],
|
|
185
|
+
pt: ["Etiquete os próximos 10 itens sem tópico", "Importe 10.1136/bmj.n71", "Procure duplicados"],
|
|
186
|
+
},
|
|
187
|
+
};
|
|
188
|
+
|
|
189
|
+
/** Plain names for the tools, shown while they run. Unknown tools keep their name. */
|
|
190
|
+
export const TOOLS = {
|
|
191
|
+
en: {
|
|
192
|
+
find_items: "search the library",
|
|
193
|
+
get_item: "read an item",
|
|
194
|
+
get_fulltext: "read the full text",
|
|
195
|
+
library_overview: "library overview",
|
|
196
|
+
list_tags: "list tags",
|
|
197
|
+
list_collections: "list collections",
|
|
198
|
+
get_vocabulary: "read the tag list",
|
|
199
|
+
tag_items: "tag items",
|
|
200
|
+
remove_tags: "remove tags",
|
|
201
|
+
rename_tags: "rename tags",
|
|
202
|
+
remove_automatic_tags: "remove automatic tags",
|
|
203
|
+
trash_items: "move items to the trash",
|
|
204
|
+
update_fields: "update fields",
|
|
205
|
+
repair_metadata: "repair metadata",
|
|
206
|
+
import_identifiers: "import",
|
|
207
|
+
import_queue: "import the queue",
|
|
208
|
+
find_duplicates: "find duplicates",
|
|
209
|
+
check_retractions: "check retractions",
|
|
210
|
+
attach_oa_pdfs: "attach open-access PDFs",
|
|
211
|
+
missing_pdfs: "find items without a PDF",
|
|
212
|
+
create_note: "add a note",
|
|
213
|
+
create_collection: "create a collection",
|
|
214
|
+
file_items: "file items in a collection",
|
|
215
|
+
set_citekeys: "set citekeys",
|
|
216
|
+
tag_audit: "check tags",
|
|
217
|
+
audit_metadata: "check metadata",
|
|
218
|
+
write_tag_review: "write a tag review note",
|
|
219
|
+
apply_tag_review: "apply a tag review note",
|
|
220
|
+
history: "recent changes",
|
|
221
|
+
undo: "undo",
|
|
222
|
+
status: "Zotero status",
|
|
223
|
+
search_pubmed: "search PubMed",
|
|
224
|
+
search_openalex: "search OpenAlex",
|
|
225
|
+
get_work: "read a publication record",
|
|
226
|
+
citation_graph: "citations",
|
|
227
|
+
library_lookup: "check the library",
|
|
228
|
+
queue_imports: "queue imports",
|
|
229
|
+
attach_note: "add a linked note",
|
|
230
|
+
check_manuscript: "check a manuscript",
|
|
231
|
+
export_bibliography: "export a bibliography",
|
|
232
|
+
read: "read a file",
|
|
233
|
+
write: "write a file",
|
|
234
|
+
edit: "edit a file",
|
|
235
|
+
grep: "search files",
|
|
236
|
+
find: "find files",
|
|
237
|
+
ls: "list a folder",
|
|
238
|
+
},
|
|
239
|
+
pt: {
|
|
240
|
+
find_items: "pesquisar na biblioteca",
|
|
241
|
+
get_item: "ler um item",
|
|
242
|
+
get_fulltext: "ler o texto completo",
|
|
243
|
+
library_overview: "resumo da biblioteca",
|
|
244
|
+
list_tags: "listar etiquetas",
|
|
245
|
+
list_collections: "listar coleções",
|
|
246
|
+
get_vocabulary: "ler a lista de etiquetas",
|
|
247
|
+
tag_items: "etiquetar itens",
|
|
248
|
+
remove_tags: "retirar etiquetas",
|
|
249
|
+
rename_tags: "mudar o nome de etiquetas",
|
|
250
|
+
remove_automatic_tags: "retirar etiquetas automáticas",
|
|
251
|
+
trash_items: "mover itens para o lixo",
|
|
252
|
+
update_fields: "atualizar campos",
|
|
253
|
+
repair_metadata: "corrigir metadados",
|
|
254
|
+
import_identifiers: "importar",
|
|
255
|
+
import_queue: "importar a fila",
|
|
256
|
+
find_duplicates: "procurar duplicados",
|
|
257
|
+
check_retractions: "verificar retratações",
|
|
258
|
+
attach_oa_pdfs: "anexar PDF em acesso aberto",
|
|
259
|
+
missing_pdfs: "procurar itens sem PDF",
|
|
260
|
+
create_note: "acrescentar uma nota",
|
|
261
|
+
create_collection: "criar uma coleção",
|
|
262
|
+
file_items: "arquivar itens numa coleção",
|
|
263
|
+
set_citekeys: "definir citekeys",
|
|
264
|
+
tag_audit: "verificar etiquetas",
|
|
265
|
+
audit_metadata: "verificar metadados",
|
|
266
|
+
write_tag_review: "escrever uma nota de revisão de etiquetas",
|
|
267
|
+
apply_tag_review: "aplicar uma nota de revisão de etiquetas",
|
|
268
|
+
history: "alterações recentes",
|
|
269
|
+
undo: "desfazer",
|
|
270
|
+
status: "estado do Zotero",
|
|
271
|
+
search_pubmed: "pesquisar na PubMed",
|
|
272
|
+
search_openalex: "pesquisar na OpenAlex",
|
|
273
|
+
get_work: "ler o registo de uma publicação",
|
|
274
|
+
citation_graph: "citações",
|
|
275
|
+
library_lookup: "verificar a biblioteca",
|
|
276
|
+
queue_imports: "pôr importações na fila",
|
|
277
|
+
attach_note: "acrescentar uma nota ligada",
|
|
278
|
+
check_manuscript: "verificar um manuscrito",
|
|
279
|
+
export_bibliography: "exportar uma bibliografia",
|
|
280
|
+
read: "ler um ficheiro",
|
|
281
|
+
write: "escrever um ficheiro",
|
|
282
|
+
edit: "editar um ficheiro",
|
|
283
|
+
grep: "pesquisar em ficheiros",
|
|
284
|
+
find: "procurar ficheiros",
|
|
285
|
+
ls: "listar uma pasta",
|
|
286
|
+
},
|
|
287
|
+
};
|
package/web/icon.svg
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="6" fill="#12161b"/><text x="16" y="21.5" text-anchor="middle" font-family="IBM Plex Mono, ui-monospace, monospace" font-size="14" font-weight="600" fill="#e0832a">SS</text></svg>
|
package/web/index.html
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
6
|
+
<meta name="color-scheme" content="light dark">
|
|
7
|
+
<title>Sub-Sub</title>
|
|
8
|
+
<link rel="icon" href="/icon.svg" type="image/svg+xml">
|
|
9
|
+
<link rel="stylesheet" href="/glauca.css">
|
|
10
|
+
<link rel="stylesheet" href="/app.css">
|
|
11
|
+
<script type="module" src="/app.js"></script>
|
|
12
|
+
</head>
|
|
13
|
+
<body data-mode="researcher">
|
|
14
|
+
<div class="app">
|
|
15
|
+
<header class="top">
|
|
16
|
+
<button type="button" class="ghost menu-btn" id="menu-btn" aria-controls="side" aria-expanded="false" data-i18n="menu">Menu</button>
|
|
17
|
+
<div class="brand"><span class="mark" aria-hidden="true">SS</span> Sub-Sub</div>
|
|
18
|
+
<div class="modes" role="group" aria-label="Mode">
|
|
19
|
+
<button type="button" data-mode="researcher" aria-pressed="true" data-i18n="researcher">Researcher</button>
|
|
20
|
+
<button type="button" data-mode="librarian" aria-pressed="false" data-i18n="librarian">Librarian</button>
|
|
21
|
+
</div>
|
|
22
|
+
<div class="status">
|
|
23
|
+
<span class="library" id="library"><span class="library-dot" aria-hidden="true"></span><span class="library-text"></span></span>
|
|
24
|
+
<label class="profile"><span class="visually-hidden" data-i18n="profile">Profile</span>
|
|
25
|
+
<select id="profile">
|
|
26
|
+
<option value="reader">Reader</option>
|
|
27
|
+
<option value="scholar">Scholar</option>
|
|
28
|
+
<option value="author">Author</option>
|
|
29
|
+
<option value="editor">Editor</option>
|
|
30
|
+
</select>
|
|
31
|
+
</label>
|
|
32
|
+
<button type="button" class="ghost model-btn" id="model-btn"></button>
|
|
33
|
+
<button type="button" class="ghost theme-btn" id="theme-btn" aria-label="Toggle theme" title="Toggle theme"></button>
|
|
34
|
+
</div>
|
|
35
|
+
</header>
|
|
36
|
+
|
|
37
|
+
<aside class="side" id="side">
|
|
38
|
+
<button type="button" class="primary block" id="new-btn" data-i18n="newConversation">New conversation</button>
|
|
39
|
+
<section class="phone-only settings">
|
|
40
|
+
<label><span data-i18n="profile">Profile</span>
|
|
41
|
+
<select id="profile-side">
|
|
42
|
+
<option value="reader">Reader</option>
|
|
43
|
+
<option value="scholar">Scholar</option>
|
|
44
|
+
<option value="author">Author</option>
|
|
45
|
+
<option value="editor">Editor</option>
|
|
46
|
+
</select>
|
|
47
|
+
</label>
|
|
48
|
+
<label><span data-i18n="model">Model</span>
|
|
49
|
+
<button type="button" class="secondary model-btn" id="model-btn-side"></button>
|
|
50
|
+
</label>
|
|
51
|
+
<label><span data-i18n="theme">Theme</span>
|
|
52
|
+
<button type="button" class="secondary theme-btn" id="theme-btn-side"></button>
|
|
53
|
+
</label>
|
|
54
|
+
</section>
|
|
55
|
+
<section>
|
|
56
|
+
<h2 data-i18n="actions">Actions</h2>
|
|
57
|
+
<div class="actions" id="actions"></div>
|
|
58
|
+
</section>
|
|
59
|
+
<section class="grow">
|
|
60
|
+
<div class="side-subhead">
|
|
61
|
+
<h2 data-i18n="conversations">Conversations</h2>
|
|
62
|
+
<button type="button" class="ghost small" id="export-btn" title="Export conversation as Markdown" data-i18n="export">Export</button>
|
|
63
|
+
</div>
|
|
64
|
+
<div class="search-wrap">
|
|
65
|
+
<input type="search" id="session-search" placeholder="Search conversations..." autocomplete="off">
|
|
66
|
+
</div>
|
|
67
|
+
<ul class="sessions" id="sessions"></ul>
|
|
68
|
+
</section>
|
|
69
|
+
<footer class="side-foot">
|
|
70
|
+
<button type="button" class="ghost small" id="quit-btn" data-i18n="quit">Close Sub-Sub</button>
|
|
71
|
+
<span class="version" id="version"></span>
|
|
72
|
+
</footer>
|
|
73
|
+
</aside>
|
|
74
|
+
|
|
75
|
+
<main class="chat" id="main">
|
|
76
|
+
<div class="banner" id="banner" hidden></div>
|
|
77
|
+
<div class="log" id="log" aria-live="polite"></div>
|
|
78
|
+
<form class="composer" id="composer">
|
|
79
|
+
<div class="suggest" id="suggest" role="listbox" hidden></div>
|
|
80
|
+
<textarea id="input" rows="2" autocomplete="off" spellcheck="true"></textarea>
|
|
81
|
+
<div class="composer-buttons">
|
|
82
|
+
<button type="button" class="secondary" id="stop" hidden data-i18n="stop">Stop</button>
|
|
83
|
+
<button type="submit" class="primary" id="send" data-i18n="send">Send</button>
|
|
84
|
+
</div>
|
|
85
|
+
</form>
|
|
86
|
+
</main>
|
|
87
|
+
</div>
|
|
88
|
+
|
|
89
|
+
<dialog id="dialog" class="modal">
|
|
90
|
+
<form method="dialog" id="dialog-form">
|
|
91
|
+
<h2 id="dialog-title"></h2>
|
|
92
|
+
<p class="hint" id="dialog-hint"></p>
|
|
93
|
+
<pre class="preview" id="dialog-message"></pre>
|
|
94
|
+
<div id="dialog-body"></div>
|
|
95
|
+
<div class="modal-buttons" id="dialog-buttons"></div>
|
|
96
|
+
</form>
|
|
97
|
+
</dialog>
|
|
98
|
+
|
|
99
|
+
<dialog id="model-dialog" class="modal wide">
|
|
100
|
+
<div class="modal-head">
|
|
101
|
+
<h2 data-i18n="modelTitle">Model</h2>
|
|
102
|
+
<button type="button" class="ghost small" id="model-close" data-i18n="close">Close</button>
|
|
103
|
+
</div>
|
|
104
|
+
<h3 data-i18n="chooseModel">Choose a model</h3>
|
|
105
|
+
<label class="check"><input type="checkbox" id="model-both" checked> <span data-i18n="forBoth">Use it in both modes</span></label>
|
|
106
|
+
<ul class="models" id="models"></ul>
|
|
107
|
+
<h3 data-i18n="connectProvider">Connect a provider</h3>
|
|
108
|
+
<form id="login-form" class="login">
|
|
109
|
+
<label><span data-i18n="provider">Provider</span>
|
|
110
|
+
<select id="login-provider"></select>
|
|
111
|
+
</label>
|
|
112
|
+
<label><span data-i18n="apiKey">API key</span>
|
|
113
|
+
<input type="password" id="login-key" autocomplete="off" spellcheck="false" required>
|
|
114
|
+
</label>
|
|
115
|
+
<p class="small"><a id="login-link" href="#" target="_blank" rel="noopener noreferrer" data-i18n="getKey">Get a key</a></p>
|
|
116
|
+
<p class="small muted" data-i18n="keyNote"></p>
|
|
117
|
+
<div class="modal-buttons"><button type="submit" class="primary" id="login-save" data-i18n="save">Save</button></div>
|
|
118
|
+
<p class="small muted" data-i18n="oauthNote"></p>
|
|
119
|
+
</form>
|
|
120
|
+
</dialog>
|
|
121
|
+
</body>
|
|
122
|
+
</html>
|