---
title: "Locator"
method: POST
path: "/predict/locator"
---

# Locator

`POST /predict/locator`

Predict potential locations of next edit

## Request body

- LocatorRequest
  - `language` string — Supported VS Code language-id of the input text
  - `commitMsg` string — A message precisely describing of the current edit
  - `prevEdits` SinglePrevEdit[] — Several latest previous edits
    - `path` string — Path of the file
    - `line` integer — Line number of the edit
    - `rmLine` string — Number of removed Lines
    - `rmText` string[] — Removed lines
    - `addLine` string — Number of added lines
    - `addText` string[] — Added lines
    - `codeAbove` string[] — Several lines of code above the edit location
    - `codeBelow` string[] — Several lines of code below the edit location
  - `files` object — All files to be scanned for potential edit locations
  - `lspServiceName` 'def&ref' | 'clone' | 'diagnose' | 'normal' — Name of the predicted edit composition type before querying locator
  - `lspFoundLocations` LspDiagnoseLocation[]
    - `file_path` string
    - `start` object
      - `line` number
      - `col` number
    - `end` object
      - `line` number
      - `col` number

## Response `200`

Successful location

- LocatorResponse
  - `files` object — Recommendation of edit locations of each file

---

[API](https://skmtc.dev/code-philia/apis/backend-api-for-trace.md) · [All operations](https://skmtc.dev/code-philia/apis/backend-api-for-trace/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/code-philia/backend-api-for-trace/revisions/371aa69912d1/schema)
