Allow each scheduled job to pin its provider and model.

New jobs snapshot the current New Session default so quota is predictable.
cron_create inherits the calling session model unless provider+model are set.
The editor lists configured models; the job row shows which model will run.
This commit is contained in:
Whale-Zhang 2026-08-24 14:31:52 +08:00
parent ef8ff6e10d
commit b0d0db1553
11 changed files with 353 additions and 19 deletions

View file

@ -48,6 +48,9 @@ test('installable bundle declares host apply, client half, unique id, and no @de
assert.match(host, /attachLiveSessionToWorkspace/)
assert.match(host, /listWorkspaceChoices/)
assert.match(host, /\/workspaces/)
assert.match(host, /listModelChoices/)
assert.match(host, /resolveJobModel/)
assert.match(host, /\/models/)
assert.doesNotMatch(host, /from ['"]@deepseek-ai\//)
const client = await readFile(join(root, 'lib/client.js'), 'utf8')
assert.match(client, /定时任务/)
@ -82,6 +85,10 @@ test('installable bundle declares host apply, client half, unique id, and no @de
assert.match(client, /cwdRecent/)
assert.match(client, /cwdCustom/)
assert.match(client, /CwdField/)
assert.match(client, /ModelField/)
assert.match(client, /api\('\/models'\)/)
assert.match(tools, /resolveCreateModel/)
assert.match(tools, /snapshots the current session model/)
assert.match(client, /api\('\/workspaces'\)/)
assert.match(client, /atToLocalInput/)
assert.match(client, /localInputToAt/)