mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-20 01:04:22 +01:00
fix: blank version issue
This commit is contained in:
@@ -65,6 +65,7 @@ type EventListResponse struct {
|
||||
// [EventListResponseEventFileWatcherUpdatedProperties],
|
||||
// [EventListResponseEventTodoUpdatedProperties],
|
||||
// [EventListResponseEventSessionIdleProperties],
|
||||
// [EventListResponseEventSessionCreatedProperties],
|
||||
// [EventListResponseEventSessionUpdatedProperties],
|
||||
// [EventListResponseEventSessionDeletedProperties],
|
||||
// [EventListResponseEventSessionErrorProperties], [interface{}],
|
||||
@@ -110,9 +111,10 @@ func (r *EventListResponse) UnmarshalJSON(data []byte) (err error) {
|
||||
// [EventListResponseEventPermissionUpdated],
|
||||
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
|
||||
// [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
|
||||
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionUpdated],
|
||||
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError],
|
||||
// [EventListResponseEventServerConnected], [EventListResponseEventIdeInstalled].
|
||||
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionCreated],
|
||||
// [EventListResponseEventSessionUpdated], [EventListResponseEventSessionDeleted],
|
||||
// [EventListResponseEventSessionError], [EventListResponseEventServerConnected],
|
||||
// [EventListResponseEventIdeInstalled].
|
||||
func (r EventListResponse) AsUnion() EventListResponseUnion {
|
||||
return r.union
|
||||
}
|
||||
@@ -126,9 +128,10 @@ func (r EventListResponse) AsUnion() EventListResponseUnion {
|
||||
// [EventListResponseEventPermissionUpdated],
|
||||
// [EventListResponseEventPermissionReplied], [EventListResponseEventFileEdited],
|
||||
// [EventListResponseEventFileWatcherUpdated], [EventListResponseEventTodoUpdated],
|
||||
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionUpdated],
|
||||
// [EventListResponseEventSessionDeleted], [EventListResponseEventSessionError],
|
||||
// [EventListResponseEventServerConnected] or [EventListResponseEventIdeInstalled].
|
||||
// [EventListResponseEventSessionIdle], [EventListResponseEventSessionCreated],
|
||||
// [EventListResponseEventSessionUpdated], [EventListResponseEventSessionDeleted],
|
||||
// [EventListResponseEventSessionError], [EventListResponseEventServerConnected] or
|
||||
// [EventListResponseEventIdeInstalled].
|
||||
type EventListResponseUnion interface {
|
||||
implementsEventListResponse()
|
||||
}
|
||||
@@ -189,6 +192,10 @@ func init() {
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(EventListResponseEventSessionIdle{}),
|
||||
},
|
||||
apijson.UnionVariant{
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(EventListResponseEventSessionCreated{}),
|
||||
},
|
||||
apijson.UnionVariant{
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(EventListResponseEventSessionUpdated{}),
|
||||
@@ -482,14 +489,16 @@ func (r eventListResponseEventMessagePartUpdatedJSON) RawJSON() string {
|
||||
func (r EventListResponseEventMessagePartUpdated) implementsEventListResponse() {}
|
||||
|
||||
type EventListResponseEventMessagePartUpdatedProperties struct {
|
||||
Part Part `json:"part,required"`
|
||||
JSON eventListResponseEventMessagePartUpdatedPropertiesJSON `json:"-"`
|
||||
Part Part `json:"part,required"`
|
||||
Delta string `json:"delta"`
|
||||
JSON eventListResponseEventMessagePartUpdatedPropertiesJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventMessagePartUpdatedPropertiesJSON contains the JSON
|
||||
// metadata for the struct [EventListResponseEventMessagePartUpdatedProperties]
|
||||
type eventListResponseEventMessagePartUpdatedPropertiesJSON struct {
|
||||
Part apijson.Field
|
||||
Delta apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
@@ -1034,6 +1043,66 @@ func (r EventListResponseEventSessionIdleType) IsKnown() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionCreated struct {
|
||||
Properties EventListResponseEventSessionCreatedProperties `json:"properties,required"`
|
||||
Type EventListResponseEventSessionCreatedType `json:"type,required"`
|
||||
JSON eventListResponseEventSessionCreatedJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventSessionCreatedJSON contains the JSON metadata for the
|
||||
// struct [EventListResponseEventSessionCreated]
|
||||
type eventListResponseEventSessionCreatedJSON struct {
|
||||
Properties apijson.Field
|
||||
Type apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *EventListResponseEventSessionCreated) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r eventListResponseEventSessionCreatedJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
func (r EventListResponseEventSessionCreated) implementsEventListResponse() {}
|
||||
|
||||
type EventListResponseEventSessionCreatedProperties struct {
|
||||
Info Session `json:"info,required"`
|
||||
JSON eventListResponseEventSessionCreatedPropertiesJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventSessionCreatedPropertiesJSON contains the JSON metadata
|
||||
// for the struct [EventListResponseEventSessionCreatedProperties]
|
||||
type eventListResponseEventSessionCreatedPropertiesJSON struct {
|
||||
Info apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *EventListResponseEventSessionCreatedProperties) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r eventListResponseEventSessionCreatedPropertiesJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionCreatedType string
|
||||
|
||||
const (
|
||||
EventListResponseEventSessionCreatedTypeSessionCreated EventListResponseEventSessionCreatedType = "session.created"
|
||||
)
|
||||
|
||||
func (r EventListResponseEventSessionCreatedType) IsKnown() bool {
|
||||
switch r {
|
||||
case EventListResponseEventSessionCreatedTypeSessionCreated:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionUpdated struct {
|
||||
Properties EventListResponseEventSessionUpdatedProperties `json:"properties,required"`
|
||||
Type EventListResponseEventSessionUpdatedType `json:"type,required"`
|
||||
@@ -1204,7 +1273,8 @@ func (r eventListResponseEventSessionErrorPropertiesJSON) RawJSON() string {
|
||||
|
||||
type EventListResponseEventSessionErrorPropertiesError struct {
|
||||
// This field can have the runtime type of [shared.ProviderAuthErrorData],
|
||||
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData].
|
||||
// [shared.UnknownErrorData], [interface{}], [shared.MessageAbortedErrorData],
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData].
|
||||
Data interface{} `json:"data,required"`
|
||||
Name EventListResponseEventSessionErrorPropertiesErrorName `json:"name,required"`
|
||||
JSON eventListResponseEventSessionErrorPropertiesErrorJSON `json:"-"`
|
||||
@@ -1239,14 +1309,16 @@ func (r *EventListResponseEventSessionErrorPropertiesError) UnmarshalJSON(data [
|
||||
// Possible runtime types of the union are [shared.ProviderAuthError],
|
||||
// [shared.UnknownError],
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
|
||||
// [shared.MessageAbortedError].
|
||||
// [shared.MessageAbortedError],
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorAPIError].
|
||||
func (r EventListResponseEventSessionErrorPropertiesError) AsUnion() EventListResponseEventSessionErrorPropertiesErrorUnion {
|
||||
return r.union
|
||||
}
|
||||
|
||||
// Union satisfied by [shared.ProviderAuthError], [shared.UnknownError],
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError] or
|
||||
// [shared.MessageAbortedError].
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthError],
|
||||
// [shared.MessageAbortedError] or
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorAPIError].
|
||||
type EventListResponseEventSessionErrorPropertiesErrorUnion interface {
|
||||
ImplementsEventListResponseEventSessionErrorPropertiesError()
|
||||
}
|
||||
@@ -1271,6 +1343,10 @@ func init() {
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(shared.MessageAbortedError{}),
|
||||
},
|
||||
apijson.UnionVariant{
|
||||
TypeFilter: gjson.JSON,
|
||||
Type: reflect.TypeOf(EventListResponseEventSessionErrorPropertiesErrorAPIError{}),
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@@ -1315,6 +1391,77 @@ func (r EventListResponseEventSessionErrorPropertiesErrorMessageOutputLengthErro
|
||||
return false
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionErrorPropertiesErrorAPIError struct {
|
||||
Data EventListResponseEventSessionErrorPropertiesErrorAPIErrorData `json:"data,required"`
|
||||
Name EventListResponseEventSessionErrorPropertiesErrorAPIErrorName `json:"name,required"`
|
||||
JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON contains the JSON
|
||||
// metadata for the struct
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorAPIError]
|
||||
type eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON struct {
|
||||
Data apijson.Field
|
||||
Name apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *EventListResponseEventSessionErrorPropertiesErrorAPIError) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r eventListResponseEventSessionErrorPropertiesErrorAPIErrorJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
func (r EventListResponseEventSessionErrorPropertiesErrorAPIError) ImplementsEventListResponseEventSessionErrorPropertiesError() {
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorData struct {
|
||||
IsRetryable bool `json:"isRetryable,required"`
|
||||
Message string `json:"message,required"`
|
||||
ResponseBody string `json:"responseBody"`
|
||||
ResponseHeaders map[string]string `json:"responseHeaders"`
|
||||
StatusCode float64 `json:"statusCode"`
|
||||
JSON eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON `json:"-"`
|
||||
}
|
||||
|
||||
// eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON contains the
|
||||
// JSON metadata for the struct
|
||||
// [EventListResponseEventSessionErrorPropertiesErrorAPIErrorData]
|
||||
type eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON struct {
|
||||
IsRetryable apijson.Field
|
||||
Message apijson.Field
|
||||
ResponseBody apijson.Field
|
||||
ResponseHeaders apijson.Field
|
||||
StatusCode apijson.Field
|
||||
raw string
|
||||
ExtraFields map[string]apijson.Field
|
||||
}
|
||||
|
||||
func (r *EventListResponseEventSessionErrorPropertiesErrorAPIErrorData) UnmarshalJSON(data []byte) (err error) {
|
||||
return apijson.UnmarshalRoot(data, r)
|
||||
}
|
||||
|
||||
func (r eventListResponseEventSessionErrorPropertiesErrorAPIErrorDataJSON) RawJSON() string {
|
||||
return r.raw
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionErrorPropertiesErrorAPIErrorName string
|
||||
|
||||
const (
|
||||
EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorAPIErrorName = "APIError"
|
||||
)
|
||||
|
||||
func (r EventListResponseEventSessionErrorPropertiesErrorAPIErrorName) IsKnown() bool {
|
||||
switch r {
|
||||
case EventListResponseEventSessionErrorPropertiesErrorAPIErrorNameAPIError:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
type EventListResponseEventSessionErrorPropertiesErrorName string
|
||||
|
||||
const (
|
||||
@@ -1322,11 +1469,12 @@ const (
|
||||
EventListResponseEventSessionErrorPropertiesErrorNameUnknownError EventListResponseEventSessionErrorPropertiesErrorName = "UnknownError"
|
||||
EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError EventListResponseEventSessionErrorPropertiesErrorName = "MessageOutputLengthError"
|
||||
EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError EventListResponseEventSessionErrorPropertiesErrorName = "MessageAbortedError"
|
||||
EventListResponseEventSessionErrorPropertiesErrorNameAPIError EventListResponseEventSessionErrorPropertiesErrorName = "APIError"
|
||||
)
|
||||
|
||||
func (r EventListResponseEventSessionErrorPropertiesErrorName) IsKnown() bool {
|
||||
switch r {
|
||||
case EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError, EventListResponseEventSessionErrorPropertiesErrorNameUnknownError, EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError, EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError:
|
||||
case EventListResponseEventSessionErrorPropertiesErrorNameProviderAuthError, EventListResponseEventSessionErrorPropertiesErrorNameUnknownError, EventListResponseEventSessionErrorPropertiesErrorNameMessageOutputLengthError, EventListResponseEventSessionErrorPropertiesErrorNameMessageAbortedError, EventListResponseEventSessionErrorPropertiesErrorNameAPIError:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
@@ -1461,6 +1609,7 @@ const (
|
||||
EventListResponseTypeFileWatcherUpdated EventListResponseType = "file.watcher.updated"
|
||||
EventListResponseTypeTodoUpdated EventListResponseType = "todo.updated"
|
||||
EventListResponseTypeSessionIdle EventListResponseType = "session.idle"
|
||||
EventListResponseTypeSessionCreated EventListResponseType = "session.created"
|
||||
EventListResponseTypeSessionUpdated EventListResponseType = "session.updated"
|
||||
EventListResponseTypeSessionDeleted EventListResponseType = "session.deleted"
|
||||
EventListResponseTypeSessionError EventListResponseType = "session.error"
|
||||
@@ -1470,7 +1619,7 @@ const (
|
||||
|
||||
func (r EventListResponseType) IsKnown() bool {
|
||||
switch r {
|
||||
case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeTodoUpdated, EventListResponseTypeSessionIdle, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected, EventListResponseTypeIdeInstalled:
|
||||
case EventListResponseTypeInstallationUpdated, EventListResponseTypeLspClientDiagnostics, EventListResponseTypeMessageUpdated, EventListResponseTypeMessageRemoved, EventListResponseTypeMessagePartUpdated, EventListResponseTypeMessagePartRemoved, EventListResponseTypeSessionCompacted, EventListResponseTypePermissionUpdated, EventListResponseTypePermissionReplied, EventListResponseTypeFileEdited, EventListResponseTypeFileWatcherUpdated, EventListResponseTypeTodoUpdated, EventListResponseTypeSessionIdle, EventListResponseTypeSessionCreated, EventListResponseTypeSessionUpdated, EventListResponseTypeSessionDeleted, EventListResponseTypeSessionError, EventListResponseTypeServerConnected, EventListResponseTypeIdeInstalled:
|
||||
return true
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user