File tree Expand file tree Collapse file tree
apps/sim/lib/copilot/chat Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,10 +3,10 @@ import { toError } from '@sim/utils/errors'
33import { LRUCache } from 'lru-cache'
44import { getHighestPrioritySubscription } from '@/lib/billing/core/subscription'
55import { isPaid } from '@/lib/billing/plan-helpers'
6+ import type { VfsSnapshotV1 } from '@/lib/copilot/generated/vfs-snapshot-v1'
67import { getExposedIntegrationTools } from '@/lib/copilot/integration-tools'
78import { getToolEntry } from '@/lib/copilot/tool-executor/router'
89import { getCopilotToolDescription } from '@/lib/copilot/tools/descriptions'
9- import type { VfsSnapshotV1 } from '@/lib/copilot/generated/vfs-snapshot-v1'
1010import { encodeVfsSegment } from '@/lib/copilot/vfs/path-utils'
1111import { isE2BDocEnabled , isHosted } from '@/lib/core/config/env-flags'
1212import { buildUserSkillTool } from '@/lib/mothership/skills'
Original file line number Diff line number Diff line change @@ -142,7 +142,10 @@ describe('handleUnifiedChatPost', () => {
142142 } )
143143 getUserEntityPermissions . mockResolvedValue ( 'write' )
144144 getEffectiveDecryptedEnv . mockResolvedValue ( { API_KEY : 'secret' } )
145- generateWorkspaceSnapshot . mockResolvedValue ( { markdown : 'workspace context' , snapshot : undefined } )
145+ generateWorkspaceSnapshot . mockResolvedValue ( {
146+ markdown : 'workspace context' ,
147+ snapshot : undefined ,
148+ } )
146149 processContextsServer . mockResolvedValue ( [ ] )
147150 resolveActiveResourceContext . mockResolvedValue ( null )
148151 buildCopilotRequestPayload . mockImplementation ( async ( params : Record < string , unknown > ) => params )
Original file line number Diff line number Diff line change @@ -23,7 +23,6 @@ import {
2323} from '@/lib/copilot/chat/process-contents'
2424import { finalizeAssistantTurn } from '@/lib/copilot/chat/terminal-state'
2525import { generateWorkspaceSnapshot } from '@/lib/copilot/chat/workspace-context'
26- import type { VfsSnapshotV1 } from '@/lib/copilot/generated/vfs-snapshot-v1'
2726import { chatPubSub } from '@/lib/copilot/chat-status'
2827import { COPILOT_REQUEST_MODES } from '@/lib/copilot/constants'
2928import {
@@ -33,6 +32,7 @@ import {
3332} from '@/lib/copilot/generated/trace-attribute-values-v1'
3433import { TraceAttr } from '@/lib/copilot/generated/trace-attributes-v1'
3534import { TraceSpan } from '@/lib/copilot/generated/trace-spans-v1'
35+ import type { VfsSnapshotV1 } from '@/lib/copilot/generated/vfs-snapshot-v1'
3636import { createBadRequestResponse , createUnauthorizedResponse } from '@/lib/copilot/request/http'
3737import { createSSEStream , SSE_RESPONSE_HEADERS } from '@/lib/copilot/request/lifecycle/start'
3838import { startCopilotOtelRoot , withCopilotSpan } from '@/lib/copilot/request/otel'
Original file line number Diff line number Diff line change 11import { db } from '@sim/db'
2- import type {
3- VfsSnapshotV1 ,
4- VfsSnapshotV1Job ,
5- VfsSnapshotV1Workflow ,
6- } from '@/lib/copilot/generated/vfs-snapshot-v1'
72import {
83 knowledgeBase ,
94 knowledgeConnector ,
@@ -16,6 +11,11 @@ import {
1611import { createLogger } from '@sim/logger'
1712import { toError } from '@sim/utils/errors'
1813import { and , eq , inArray , isNull } from 'drizzle-orm'
14+ import type {
15+ VfsSnapshotV1 ,
16+ VfsSnapshotV1Job ,
17+ VfsSnapshotV1Workflow ,
18+ } from '@/lib/copilot/generated/vfs-snapshot-v1'
1919import { normalizeVfsSegment } from '@/lib/copilot/vfs/normalize-segment'
2020import { canonicalWorkflowVfsDir , canonicalWorkspaceFilePath } from '@/lib/copilot/vfs/path-utils'
2121import { getAccessibleOAuthCredentials } from '@/lib/credentials/environment'
You can’t perform that action at this time.
0 commit comments