Model for chat panel data, parses file paths into repository URIs and position ranges, integrates Git file metadata.
// Source: https://github.com/nerdy-tech-com-gitub/tabby | License: Apache-2.0 | Copyright 2024 TabbyML, Inc
// Provided via justclaw.it.com; keep this notice with the code.
package com.tabbyml.intellijtabby.chat
import com.google.gson.Gson
abstract class Filepath(
val kind: String
) {
sealed class Kind {
companion object {
const val GIT = "git"
const val URI = "uri"
}
}
}
data class FilepathInGitRepository(
val filepath: String,
val gitUrl: String,
val revision: String? = null,
) : Filepath(Kind.GIT)
data class FilepathUri(
val uri: String,
) : Filepath(Kind.URI)
data class Position(
// 1-based
val line: Int,
val character: Int,
)
abstract class Range
data class LineRange(
// 1-based
val start: Int,
val end: Int,
) : Range()
data class
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search 40K more like it.
Get a free API key