Skip to content

Commit

Permalink
Remove leftovers
Browse files Browse the repository at this point in the history
  • Loading branch information
vovakulikov committed Oct 22, 2024
1 parent 84d9f29 commit 747d5d3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions vscode/src/chat/chat-view/prompts-migration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ import { Observable, Subject } from 'observable-fns'

import { PromptMode } from '@sourcegraph/cody-shared'
import { getCodyCommandList } from '../../commands/CommandsController'
import { sleep } from '../../completions/utils'
import { remoteReposForAllWorkspaceFolders } from '../../repository/remoteRepos'
import { localStorage } from '../../services/LocalStorageProvider'

Expand All @@ -41,7 +40,7 @@ export function getPromptsMigrationInfo(): Observable<PromptsMigrationStatus> {
// Don't run migration if you're already run this before (ignore any other new commands
// that had been added after first migration run
const migrationMap = localStorage.get<Record<string, boolean>>(PROMPTS_MIGRATION_KEY) ?? {}
const commands = [] // getCodyCommandList().filter(command => command.type !== 'default')
const commands = getCodyCommandList().filter(command => command.type !== 'default')

if (!repository || migrationMap[repoKey(repository?.id ?? '')]) {
return Observable.of<PromptsMigrationStatus>({
Expand Down Expand Up @@ -95,8 +94,6 @@ export async function startPromptsMigration(): Promise<void> {
try {
const prompts = await graphqlClient.queryPrompts(commandKey.replace(/\s+/g, '-'))

await sleep(3000)

// If there is no prompts associated with the command include this
// command to migration
if (prompts.length === 0) {
Expand Down Expand Up @@ -130,8 +127,6 @@ export async function startPromptsMigration(): Promise<void> {
visibility: 'SECRET',
})

await sleep(3000)

// Change prompt visibility to PUBLIC if it's admin performing migration
// TODO: [VK] Remove it and use visibility field in prompt creation (current API limitation)
if (authStatus.siteAdmin) {
Expand Down

0 comments on commit 747d5d3

Please sign in to comment.