Skip to content

Commit fa25ef6

Browse files
committed
chore(copilot): remove scheduled-task remnants
1 parent fbd02bc commit fa25ef6

6 files changed

Lines changed: 7 additions & 49 deletions

File tree

apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/prompt-editor/prompt-editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ export interface PromptEditorProps extends PromptEditorKeyPolicy {
3131
* Renders the editor as a non-editable display surface: the textarea becomes
3232
* `readOnly` (so the chip overlay still paints `@`-mention / `/`-skill chips
3333
* and the text stays selectable/copyable) and the caret-anchored resource and
34-
* skill menus are not mounted. Use for read-only records — e.g. a finished
35-
* scheduled task — where the prompt should render with chips but not be edited.
34+
* skill menus are not mounted. Use for records where the prompt should render
35+
* with chips but not be edited.
3636
*/
3737
readOnly?: boolean
3838
/**

apps/sim/lib/api/contracts/mothership-chats.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,8 +116,8 @@ export const mothershipExecuteBodySchema = z.object({
116116
fileAttachments: z.array(mothershipExecuteFileAttachmentSchema).optional(),
117117
/**
118118
* `@`-mentioned resources / `/`-invoked skills to resolve into the agent run,
119-
* mirroring the interactive chat path. Used by scheduled tasks, whose
120-
* captured contexts must reach the run without a live client.
119+
* mirroring the interactive chat path. Headless executions use this to pass
120+
* captured contexts into the run without a live client.
121121
*/
122122
contexts: z.array(scheduleContextSchema).optional(),
123123
mcpTools: z.array(mothershipExecuteMcpToolSchema).optional(),

apps/sim/lib/copilot/chat/workspace-context.test.ts

Lines changed: 0 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -166,26 +166,6 @@ describe('buildWorkspaceMd - determinism (prompt-cache stability)', () => {
166166
{ id: 'sk-2', name: 'Writer', description: 'writes' },
167167
{ id: 'sk-1', name: 'Editor', description: 'edits' },
168168
],
169-
jobs: [
170-
{
171-
id: 'j-2',
172-
title: 'Nightly',
173-
prompt: 'run nightly',
174-
cronExpression: '0 0 * * *',
175-
status: 'active',
176-
lifecycle: 'persistent',
177-
sourceTaskName: null,
178-
},
179-
{
180-
id: 'j-1',
181-
title: 'Hourly',
182-
prompt: 'run hourly',
183-
cronExpression: '0 * * * *',
184-
status: 'active',
185-
lifecycle: 'persistent',
186-
sourceTaskName: null,
187-
},
188-
],
189169
})
190170
)
191171
const b = buildWorkspaceMd(
@@ -223,26 +203,6 @@ describe('buildWorkspaceMd - determinism (prompt-cache stability)', () => {
223203
{ id: 'sk-1', name: 'Editor', description: 'edits' },
224204
{ id: 'sk-2', name: 'Writer', description: 'writes' },
225205
],
226-
jobs: [
227-
{
228-
id: 'j-1',
229-
title: 'Hourly',
230-
prompt: 'run hourly',
231-
cronExpression: '0 * * * *',
232-
status: 'active',
233-
lifecycle: 'persistent',
234-
sourceTaskName: null,
235-
},
236-
{
237-
id: 'j-2',
238-
title: 'Nightly',
239-
prompt: 'run nightly',
240-
cronExpression: '0 0 * * *',
241-
status: 'active',
242-
lifecycle: 'persistent',
243-
sourceTaskName: null,
244-
},
245-
],
246206
})
247207
)
248208
expect(a).toBe(b)

apps/sim/lib/copilot/request/tools/permission.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,8 @@ export const TOOL_AWAITING_APPROVAL_STATUS = MothershipStreamV1ToolStatus.awaiti
5454
/**
5555
* Whether this call must be held for an explicit user decision.
5656
*
57-
* Headless and non-interactive runs (scheduled tasks, one-shot execute) are
58-
* never gated: nobody is there to answer, and blocking them would hang the run
59-
* until the orchestration timeout.
57+
* Headless one-shot executions are never gated: nobody is there to answer, and
58+
* blocking them would hang the run until the orchestration timeout.
6059
*/
6160
export function toolCallNeedsApproval(
6261
toolName: string,

apps/sim/lib/copilot/tools/handlers/function-execute.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ function unmountableNamespaceReason(filePath: string): string | null {
198198
if (path.startsWith('tables/')) {
199199
return 'tables are not mounted as files. Pass the table in inputs.tables instead and it is mounted as CSV.'
200200
}
201-
const namespace = /^(workflows|knowledgebases|components|environment|agent|jobs|tasks)\//.exec(
201+
const namespace = /^(workflows|knowledgebases|components|environment|agent|tasks)\//.exec(
202202
path
203203
)?.[1]
204204
if (namespace) {

apps/sim/lib/copilot/tools/tool-display.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,6 @@ describe('getToolDisplayTitle natural-language coverage', () => {
116116
'Managing table',
117117
'Preparing file',
118118
'Processing media',
119-
'Scheduled task action',
120119
'Skill action',
121120
])
122121
const unresolvedVariants: string[] = []

0 commit comments

Comments
 (0)