-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: front end and backend draft #3522
Open
antimonyGu
wants to merge
6
commits into
TabbyML:main
Choose a base branch
from
antimonyGu:check-is-workspace-indexed
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wsxiaoys
requested changes
Dec 6, 2024
9f46d77
to
763609c
Compare
wsxiaoys
requested changes
Dec 11, 2024
04c17ec
to
88c26a9
Compare
48a8de6
to
d8dc027
Compare
c53b738
to
d16b1bd
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Test:
When repo is not indexed, return data.
{ "operation": { "key": -1177702502, "query": { "kind": "Document", "definitions": [ { "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ResolveGitUrl" }, "variableDefinitions": [ { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "gitUrl" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } ], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "resolveGitUrl" }, "arguments": [ { "kind": "Argument", "name": { "kind": "Name", "value": "gitUrl" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "gitUrl" } } } ], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sourceId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sourceKind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sourceName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gitUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "refs" }, "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "commit" } } ] } } ] } } ] } } ], "loc": { "start": 0, "end": 200, "source": { "body": "query ResolveGitUrl($gitUrl: String!) {\n resolveGitUrl(gitUrl: $gitUrl) {\n id\n sourceId\n sourceKind\n sourceName\n name\n kind\n gitUrl\n refs {\n name\n commit\n }\n }\n}", "name": "gql", "locationOffset": { "line": 1, "column": 1 } } }, "__key": 4284452584 }, "variables": { "gitUrl": "[email protected]:sourcegraph/cody.git" }, "kind": "query", "context": { "url": "/graphql", "requestPolicy": "cache-and-network", "suspense": false, "meta": { "cacheOutcome": "miss" } } }, "data": { "resolveGitUrl": null }, "hasNext": false, "stale": false }
When repo is indexed, return data.
{ "operation": { "key": -4499522075, "query": { "kind": "Document", "definitions": [ { "kind": "OperationDefinition", "operation": "query", "name": { "kind": "Name", "value": "ResolveGitUrl" }, "variableDefinitions": [ { "kind": "VariableDefinition", "variable": { "kind": "Variable", "name": { "kind": "Name", "value": "gitUrl" } }, "type": { "kind": "NonNullType", "type": { "kind": "NamedType", "name": { "kind": "Name", "value": "String" } } } } ], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "resolveGitUrl" }, "arguments": [ { "kind": "Argument", "name": { "kind": "Name", "value": "gitUrl" }, "value": { "kind": "Variable", "name": { "kind": "Name", "value": "gitUrl" } } } ], "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "id" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sourceId" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sourceKind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "sourceName" } }, { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "kind" } }, { "kind": "Field", "name": { "kind": "Name", "value": "gitUrl" } }, { "kind": "Field", "name": { "kind": "Name", "value": "refs" }, "selectionSet": { "kind": "SelectionSet", "selections": [ { "kind": "Field", "name": { "kind": "Name", "value": "name" } }, { "kind": "Field", "name": { "kind": "Name", "value": "commit" } } ] } } ] } } ] } } ], "loc": { "start": 0, "end": 200, "source": { "body": "query ResolveGitUrl($gitUrl: String!) {\n resolveGitUrl(gitUrl: $gitUrl) {\n id\n sourceId\n sourceKind\n sourceName\n name\n kind\n gitUrl\n refs {\n name\n commit\n }\n }\n}", "name": "gql", "locationOffset": { "line": 1, "column": 1 } } }, "__key": 4284452584 }, "variables": { "gitUrl": "[email protected]:antimonyGu/tabby.git" }, "kind": "query", "context": { "url": "/graphql", "requestPolicy": "network-only", "suspense": false } }, "data": { "resolveGitUrl": { "id": "git:E16n1q", "sourceId": "git:E16n1q", "sourceKind": "GIT", "sourceName": "https://github.com/antimonyGu/tabby", "name": "my-tabby", "kind": "GIT", "gitUrl": "https://github.com/antimonyGu/tabby", "refs": [ { "name": "refs/heads/main", "commit": "3df11d1eb3c3d652ef715f644eb1f44730ff255f" }, { "name": "refs/tags/nightly", "commit": "3df11d1eb3c3d652ef715f644eb1f44730ff255f" } ] } }, "hasNext": false, "stale": false }