Commit Graph

15 Commits

Author SHA1 Message Date
Marcello Fitton
41495cdabe
feat: Scheduled Jobs (#5322)
* initialize

* expand tool result text limit | add syntax highlighting and json formatting to tool result rendering

* fix onError jsdoc

* lint

* fix unread icon

* route protection

* improve form handling for NewJobModal

* safeJsonParse

* remove unneeded comments

* remove trycatch

* add truncateText helper

* add explicit fallback value tos safeJsonParse

* add shared cron constant and helpers

* reduce frontend indirection

* use isLight to compute syntax highlighting theme

* remove dead code

* remove forJob and make job limit to 50

* create recomputeNextRunAt helper method

* add comment about nextRunAt recomputation

* add job queue and concurrency control to scheduled jobs

* use p-queue

* change default max concurrent value to 1

* add comment explaining internal scheduling system

* add recomputeNextRunAt on boot

* add generated documents to run details

* Modify toolsOverride functionality where no tools selected means no tools are given to the agent

add a select all/deselect all toggle button for easily selecting all
tools in the cerate job form

* create usePolling hook

* add polling to scheduled jobs and scheduled job runs pages

* add cron generation feature in job form

* remove cron generation feature | add cron builder feature | add max active scheduled jobs limit

* set MAX_ACTIVE to null

* replace hour and minute input fields with input with type time

* simplify

* organize components

* move components to bottom of page component

* change Generated Documents to Generated Files

* add i18n to cronstrue

* add i18n

* add type="button" to button elements

* refactor fileSource retrieval logic

* one scheduled job run can have status "running"

* add protection of file retrieveal from scheduled job in multiuser mode

* fix comments

* make job status default to queued

* add queued status

* fix bug with result trace rendering

* store timeout ref and clearTimeout once race settles

* remove unneeded handlerPromise tracking

* move imports to top level

* refactor hardcoded paths to path resolve functions

* implement new job form design

* simplify

* fix button styles

* fix runJob bug

* implement styles for scheduled jobs page

* apply dark mode figma styles

* delete unused translation key

* implement light mode for new new job modal, run history, and run details

* lint

* fix light mode scroll bar in tool call card

* adjust table header contrast

* fix type in subtitle

* kill workers when job is in-flight before deleting job

* add border-none to buttons

* change locale time to iso string

* import BackgroundService module level | instatiate backgroundService singltone once and reuse across handlers

* add p-queue, @breejs/later and cron-validate as core deps

* parse cron expression to a builder state once

* add theme to day buttons in cron builder

* fix stale tools selection caption

* flip popover when popover clips screen height

* make ScheduleJob.trigger() await the run insertion | disable run now button if job is in flight

* regen table

* refactor generated file card

* refactor frontend

* remove logs

* major refactor for tool picking, fix bree/later bug

* combine action endpoints, move contine to method

* fix unoptimized query with include + take + order

* fix dangerous use, refactor job to utils

* add copy content to text response

* improve notification system subscription for browser

* remove unused translations

* prevent gen-file cleanup job from deleting active job file generated references

* rich text copy

* Scheduled Jobs: Translations (#5482)

* add locales for scheduled jobs

* i18n

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>

* add config flag with UI notice

* update README

* telemetry datapoints

* Always use UTC on backend, convert to local in frontend

* fix tz render

* Add job killing

* cleanup thinking text in job notifications and break out reasoning in response text.
Also hide zero metrics since that is useless

* Port generatedFile schema to the normalized workspace chat `outputs` file format so porting to thread is simple and implem between chats <> jobs is 1:1

* what the fuck

* compiled bug

* fixed thinking oddity in complied frontend

* supress multi-toast

* fix duration call

* Revert "fix duration call"

This reverts commit 0491bc71f4223e65ea4046561b15b268fefb8da2.

* revert and reapply fix

---------

Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-04-29 12:05:46 -07:00
Timothy Carambat
7e9737dd86
add ask to run prompt for tool calls (demo) (#5261)
* add ask to run prompt for tools

* border-none on buttons

* translations

* linting

* i18n (#5263)

* extend approve/deny requests to telegram

* break up handler
2026-03-24 15:18:17 -07:00
Timothy Carambat
f395083978
Automatic mode for workspace (Agent mode default) (#5143)
* Add automatic chat mode with native tool calling support

    Introduces a new automatic chat mode (now the default) that automatically invokes tools when the provider supports native tool calling. Conditionally shows/hides the @agent command based on whether native tooling is available.

    - Add supportsNativeToolCalling() to AI providers (OpenAI, Anthropic, Azure always support; others opt-in via ENV)
    - Update all locale translations with new mode descriptions
    - Enhance translator to preserve Trans component tags
    - Remove deprecated ability tags UI

* rebase translations

* WIP on image attachments. Supports initial image attachment + subsequent attachments

* persist images

* Image attachments and updates for providers

* desktop pre-change

* always show command on failure

* add back gemini streaming detection

* move provider native tooling flag to Provider func

* whoops - forgot to delete

* strip "@agent" from prompts to prevent weird replies

* translations for automatic-mode (#5145)

* translations for automatic-mode

* rebase

* translations

* lint

* fix dead translations

* change default for now to chat mode just for rollout

* remove pfp for workspace

* passthrough workspace for showAgentCommand detection and rendering

* Agent API automatic mode support

* ephemeral attachments passthrough

* support reading of pinned documents in agent context
2026-03-18 12:35:43 -07:00
Marcello Fitton
4a4378ed99
chore: add ESLint to /server (#5126)
* add eslint config to server

* add break statements to switch case

* add support for browser globals and turn off empty catch blocks

* disable lines with useless try/catch wrappers

* format

* fix no-undef errors

* disbale lines violating no-unsafe-finally

* ignore syncStaticLists.mjs

* use proper null check for creatorId instead of unreachable nullish coalescing

* remove unneeded typescript eslint comment

* make no-unused-private-class-members a warning

* disable line for no-empty-objects

* add new lint script

* fix no-unused-vars violations

* make no-unsued-vars an error

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
Co-authored-by: Timothy Carambat <rambat1010@gmail.com>
2026-03-05 16:32:45 -08:00
Timothy Carambat
ac0b1d401d
Native Tool calling (#5071)
* checkpoint

* test MCP and flows

* add native tool call detection back to LMStudio

* add native tool call loops for Ollama

* Add ablity detection to DMR (regex parse)

* bedrock and generic openai with ENV flag

* deepseek native tool calling

* localAI native function

* groq support

* linting, add litellm and OR native tool calling via flag
2026-02-26 13:37:56 -08:00
Sean Hatfield
f5f8fb1edb
Agent workspace system prompt with variable expansion (#4526)
* agent workspace system prompt with variable expansion

* cleanup

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-10-15 13:32:50 -07:00
omahs
946be93f08
Fix typos (#3826)
* Fix typos

* language

---------

Co-authored-by: timothycarambat <rambat1010@gmail.com>
2025-05-14 09:30:28 -07:00
Timothy Carambat
7afbc6d11b
enable MCP tool use via @agent in API calls (#3683)
* enable MCP tool use via `@agent` in API calls

* relocate import
2025-04-20 14:49:22 -07:00
Timothy Carambat
4d06884a36
add AgentFlow execution via API chat invocation (#3545)
* add AgentFlow execution via API chat invocation

* reorder import
2025-03-26 13:57:26 -07:00
Timothy Carambat
d35b37b6ec
wip agent ui animation (#2999)
* wip agent ui animation

* WIP agent ui revision

* linting

* simplify css

* memoize agent responses

---------

Co-authored-by: shatfield4 <seanhatfield5@gmail.com>
2025-01-22 11:10:02 -08:00
timothycarambat
3fe59a7cf5 patch bad reference for EphemeralAgentHandler 2024-10-29 10:02:46 -07:00
Timothy Carambat
c734742189
Rework failover agent invocation selection for agent and ephemmeral agent (#2515)
* Rework failover agent invocation selection for agent and ephemmeral agent

* update order of check

* update order of check

* lint
2024-10-21 14:40:30 -07:00
Timothy Carambat
b557a289fe
Support @agent custom skills (#2280)
* Support `@agent` custom skills

* move import
2024-09-13 14:35:10 -07:00
Timothy Carambat
22ecb7cb39
Add RAG agent plugin to API agent (#2171) 2024-08-23 09:32:19 -07:00
Timothy Carambat
2de9e492ec
Enabled use of @agent (and skills) via dev API calls (#2161)
* Use `@agent` via dev API

* Move EphemeralEventListener to same file as agent
2024-08-22 13:12:09 -07:00