-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Nate/continue-sdk-more-routes #6646
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cubic found 9 issues across 66 files. Review them in cubic.dev
React with 👍 or 👎 to teach cubic. Tag @cubic-dev-ai
to give specific feedback.
/** | ||
* Check if a given object implements the ListOrganizations200Response interface. | ||
*/ | ||
export function instanceOfListOrganizations200Response(value: object): value is ListOrganizations200Response { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type of the value parameter is object, which does not allow indexing with a string key. This can cause a TypeScript error when accessing value['organizations']. Consider using Record<string, unknown> or any as the parameter type.
export function instanceOfListOrganizations200Response(value: object): value is ListOrganizations200Response { | |
export function instanceOfListOrganizations200Response(value: any): value is ListOrganizations200Response { |
|
||
def testGetAssistant404Response(self): | ||
"""Test GetAssistant404Response""" | ||
# inst_req_only = self.make_instance(include_optional=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test case for required parameters is commented out, so the test does not actually verify the behavior of GetAssistant404Response with required parameters.
# inst_req_only = self.make_instance(include_optional=False) | |
inst_req_only = self.make_instance(include_optional=False) |
|
||
def testGetPolicy200Response(self): | ||
"""Test GetPolicy200Response""" | ||
# inst_req_only = self.make_instance(include_optional=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test cases are commented out, so no actual tests are being run. This means the test will always pass regardless of code correctness.
* | ||
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech). | ||
* https://openapi-generator.tech | ||
* Do not edit the class manually. | ||
*/ | ||
|
||
import { mapValues } from "../runtime"; | ||
import { mapValues } from '../runtime'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mapValues is imported but never used anywhere in this file, resulting in dead code and potential TypeScript compile errors when noUnusedLocals
is enabled.
|
||
def testGetAssistant200Response(self): | ||
"""Test GetAssistant200Response""" | ||
# inst_req_only = self.make_instance(include_optional=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test methods should include at least one assertion or meaningful test logic. This test currently only contains commented-out code, so it does not actually test anything.
/** | ||
* Check if a given object implements the GetModelsAddOnCheckoutUrl200Response interface. | ||
*/ | ||
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: object): value is GetModelsAddOnCheckoutUrl200Response { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The type of the 'value' parameter is 'object', which does not allow indexing with a string key in TypeScript. This can cause a type error when accessing value['url']. Consider using 'any' or a more specific type that allows string indexing.
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: object): value is GetModelsAddOnCheckoutUrl200Response { | |
export function instanceOfGetModelsAddOnCheckoutUrl200Response(value: any): value is GetModelsAddOnCheckoutUrl200Response { |
# create an instance of GetModelsAddOnCheckoutUrl200Response from a JSON string | ||
get_models_add_on_checkout_url200_response_instance = GetModelsAddOnCheckoutUrl200Response.from_json(json) | ||
# print the JSON string representation of the object | ||
print(GetModelsAddOnCheckoutUrl200Response.to_json()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling to_json() as a static method on the class will not serialize the instance; it should be called on the instance to get the JSON representation.
print(GetModelsAddOnCheckoutUrl200Response.to_json()) | |
print(get_models_add_on_checkout_url200_response_instance.to_json()) |
return typeof apiKey === "function" ? apiKey : () => apiKey; | ||
constructor(private configuration: ConfigurationParameters = {}) {} | ||
|
||
set config(configuration: Configuration) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Setter parameter type does not match the underlying configuration
property type (ConfigurationParameters
), causing type incompatibility and misleading API usage.
set config(configuration: Configuration) { | |
set config(configuration: ConfigurationParameters) { |
|
||
# Configure Bearer authorization: apiKeyAuth | ||
configuration = openapi_client.Configuration( | ||
access_token = os.environ["BEARER_TOKEN"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The example references os.environ but the snippet never imports the os module, so copying the code as-is raises NameError.
Description
Adds more routes to the Continue SDK
Checklist
Tests
This is generated code, but has been tested as a part of the CLI
Summary by cubic
Added new API routes and models to the Continue SDK for both Python and TypeScript, including endpoints for assistants, organizations, free trial status, and policy management.