72 Commits

Author SHA1 Message Date
Jon Fuller
8727ff95f1
Merge branch 'develop' into ai-llm-integration 2025-04-11 13:27:51 -07:00
perf3ct
451e5ea31f
getting closer to streaming?
even closer?

closer streaming...

this is darn close
2025-04-11 20:18:20 +00:00
Elian Doran
d8964aee28
Revert "deps: manual upgrade to express 5.1.0" 2025-04-11 16:51:42 +03:00
Elian Doran
32a6aed93b
Merge remote-tracking branch 'origin/develop' into calendar 2025-04-10 21:25:58 +03:00
Panagiotis Papadopoulos
8d09ff4299 fix(routes): remove unused wildcard in apiRoute "/api/options/:name/:value*"
the updateOption function that handles the req.param is just destructuring `const { name, value } = req.params;` and does nothing else with the path or any params.
The remaining parts of the wildcard (which can be accessed via req.param[0]) are just ignored here.

even with express v4, this would *always* just take and process the very first part of the path, in the exact wildcard's place, e.g.

`/api/options/locale/de` and
`/api/options/locale/de/test/whatever`
would *both* end up destructuring "value" from req.param as "de" (because it is in the exact place of the 'value' wildcard)

in express v5 the wildcard behaviour changes -> here req.param.value would return an array with the paths split into separate string.

but since the code previously regarded only the first part of the path -> we can just get rid of the wildcard and use a named route param

the only thing to keep in mind: if a request with more than one "value" is received, (e.g. `/api/options/locale/de/test/whatever`) -> since we don't have the wildcard anymore  -> this will turn to a 404.
IMHO that is actually desirable here though
2025-04-08 23:50:53 +02:00
Elian Doran
5daed43c0f
Merge branch 'develop' into ai-llm-integration 2025-04-06 18:07:39 +03:00
Jin
bf70b949a6 Merge branch 'develop' into calendar 2025-04-02 23:28:15 +02:00
Panagiotis Papadopoulos
3f0dbb9063 chore: fix typo in verifyRecoveryCode function name 2025-04-02 21:41:48 +02:00
Jin
396c32bb7d Merge branch 'develop' into calendar 2025-04-02 12:23:19 +02:00
perf3ct
7ae55de8b1
move the embeddings api endpoint to underneath llm 2025-04-01 18:44:10 +00:00
perf3ct
1690217797
update LLM API endpoints 2025-04-01 10:55:20 -07:00
perf3ct
b7f2a9663e
swap route for apiRoute in LLM routes 2025-04-01 10:47:05 -07:00
Jin
50009bfb6e feat: 🎸 add frontend api support 2025-04-01 19:13:09 +02:00
Jin
c43cca6c22 feat: 🎸 add and fix week note api services 2025-04-01 16:25:03 +02:00
SiriusXT
adcb803caa To prevent search lag when there are a large number of notes 2025-04-01 21:07:15 +08:00
Jin
674e5976ef refactor: 💡 rename getWeekNote to getWeekFirstDayNote 2025-04-01 14:46:35 +02:00
SiriusXT
a7799d32b0 To prevent search lag when there are a large number of notes 2025-04-01 18:47:07 +08:00
perf3ct
435e7cdd4f
Merge branch 'develop' into ai-llm-integration 2025-03-31 15:55:41 +00:00
Jin
0871d16fbc feat: 🎸 remove conflict code 2025-03-22 12:41:22 +01:00
Jin
8df1e3263b Merge branch 'develop' into feature/MFA 2025-03-22 12:35:00 +01:00
perf3ct
c40c702761
add anthropic options as well 2025-03-17 20:17:28 +00:00
perf3ct
4a4eac6f25
Allow users to specify OpenAI embedding and chat models 2025-03-17 20:07:53 +00:00
perf3ct
eaa947ef7c
"rebuild index" functionality for users 2025-03-12 00:08:39 +00:00
perf3ct
fc5599575c
allow users to manually request index to be rebuilt 2025-03-11 23:29:54 +00:00
perf3ct
730d123802
create llm index service 2025-03-11 23:26:47 +00:00
perf3ct
f47b070f0f
I think this works to handle failed embeddings 2025-03-11 20:22:01 +00:00
perf3ct
56fc720ac7
undo accidental MAX_ALLOWED_FILE_SIZE_MB change 2025-03-11 17:31:26 +00:00
perf3ct
ff679b00b6
move providers to their own folder 2025-03-11 17:30:50 +00:00
perf3ct
c1585c73da
actually shows useful responses now 2025-03-10 05:06:33 +00:00
perf3ct
ef6ecdc42d
it errors, but works 2025-03-10 04:28:56 +00:00
perf3ct
adaac46fbf
I'm 100% going to have to destroy this commit later 2025-03-09 02:19:26 +00:00
perf3ct
0cd1be5568
Show embedding generation stats to user 2025-03-08 23:17:13 +00:00
perf3ct
0daa9e717f
I can create embeddings now? 2025-03-08 23:13:49 +00:00
perf3ct
d3013c925e
add additional options for ollama embeddings 2025-03-08 22:23:50 +00:00
perf3ct
1361e4d438
set up embedding API endpoints 2025-03-08 22:04:10 +00:00
Panagiotis Papadopoulos
c120132cbb
Merge branch 'develop' into chore_eslint-fixes_src-routes 2025-03-08 17:15:53 +01:00
Panagiotis Papadopoulos
ecf1a0e4ad refactor(utils): add safeExtractMessageAndStackFromError util to remove code duplication 2025-03-08 17:07:25 +01:00
Panagiotis Papadopoulos
e3d0c53d03 chore(routes): fix no-explicit-any lint/ts error for catch blocks 2025-03-08 16:03:30 +01:00
Panagiotis Papadopoulos
d8ce385134 refactor(routes): refactor handleException and get rid of "any" type 2025-03-07 22:27:13 +01:00
Elian Doran
00e576b052
Revert "Merge pull request #1234 from TriliumNext/feature/task_list"
This reverts commit 58a8821c229898c45551da16476d44c010c345ef, reversing
changes made to 50d491b432ce811c4d5e597e952eb18a89ae6c19.
2025-03-06 23:52:01 +02:00
Elian Doran
fcd7b986aa
feat(tasks): make due date editable 2025-02-25 18:36:46 +02:00
Elian Doran
c0d3e8d834
feat(tasks): filter by parent note 2025-02-19 22:13:13 +02:00
Elian Doran
7c0b43db85
feat(tasks): mark tasks as completed 2025-02-19 19:22:38 +02:00
Elian Doran
17f9fa7e89
feat(tasks): add POST API 2025-02-18 19:30:02 +02:00
Elian Doran
98dff61305
feat(tasks): add GET API 2025-02-18 19:06:02 +02:00
perf3ct
18f5f1b759
add Swagger UI endpoint and add to router 2025-02-09 21:15:12 +00:00
Panagiotis Papadopoulos
ca2bb94200 refactor(server/utils): isElectron - replace fn with boolean
this values cannot change during runtime,
=> there is no need to have these checks
as dynamic function, instead just
export the boolean value directly
2025-01-29 10:55:53 +01:00
Panagiotis Papadopoulos
e3d89ce2a5 refactor(csrf): move csrf to own file 2025-01-16 20:14:23 +01:00
Panagiotis Papadopoulos
ea621ef8e1 chore(prettier): fix code style 2025-01-12 13:30:02 +01:00
Panagiotis Papadopoulos
d20a3bab2a fix(csrfMiddleware): use sessionSecret instead
since `cookie-parser` is not configured with a secret,
req.secret is not set and hence is `undefined`,
which then is used as literal 'undefined' in the hashing function – making it less secure.

Instead we can use the existing sessionSecret:
the `csrf-csrf` developer confirmed in their Discord chat,
that it would be ok to use the same secret here.
2025-01-12 10:22:05 +01:00