hunk.code_window: export function useNav(route: ComputedRef<RouteRecordRaw | RouteLocationNormalizedLoaded>): SlidevContextNav {
     const path = computed(() => route.value.path)
     const total = computed(() => rawRoutes.length)
     const currentPage = computed(() => parseInt(path.value.split(/\//g).slice(-1)[0]) || 1)
     const currentPath = computed(() => getPath(currentPage.value))
     const currentRoute = computed(() => rawRoutes.find(i => i.path === `${currentPage.value}`))
     const currentSlideId = computed(() => currentRoute.value?.meta?.slide?.id)
  
hunk.labels: keep keep keep keep keep replace keep keep keep
hunk.after_edit:   const currentPage = computed(() => Number.parseInt(path.value.split(/\//g).slice(-1)[0]) || 1)
  
hunk.file_path: packages/client/composables/useNav.ts
hunk.type: replace
file: import { join } from 'path'
  import { objectMap } from '@antfu/utils'
  import { fs } from 'zx'
  
  const templates = [
    'packages/create-app/template',
    'packages/create-theme/template',
  ]
  
  const { version } = await fs.readJSON('package.json')
  
  for (const template of templates) {
    const path = join(template, 'package.json')
    const pkg = await fs.readJSON(path)
    const deps = ['dependencies', 'devDependencies']
    for (const name of deps) {
      if (!pkg[name])
        continue
      pkg[name] = objectMap(pkg[name], (k, v) => {
        if (k.startsWith('@slidev/') && !k.startsWith('@slidev/theme'))
          return [k, `^${version}`]
        return [k, v]
      })
    }
    await fs.writeJSON(path, pkg, { spaces: 2 })
  }
  