mirror of
https://github.com/aljazceru/opencode.git
synced 2026-01-02 07:25:00 +01:00
wip: undo properly remove messages from UI
This commit is contained in:
@@ -46,7 +46,6 @@ import {
|
||||
FindSymbolsResponse,
|
||||
FindTextParams,
|
||||
FindTextResponse,
|
||||
Match,
|
||||
Symbol,
|
||||
} from './resources/find';
|
||||
import {
|
||||
@@ -789,7 +788,6 @@ export declare namespace Opencode {
|
||||
|
||||
export {
|
||||
Find as Find,
|
||||
type Match as Match,
|
||||
type Symbol as Symbol,
|
||||
type FindFilesResponse as FindFilesResponse,
|
||||
type FindSymbolsResponse as FindSymbolsResponse,
|
||||
|
||||
@@ -77,6 +77,8 @@ export interface Mode {
|
||||
model?: Mode.Model;
|
||||
|
||||
prompt?: string;
|
||||
|
||||
temperature?: number;
|
||||
}
|
||||
|
||||
export namespace Mode {
|
||||
|
||||
@@ -20,6 +20,11 @@ export interface Config {
|
||||
*/
|
||||
$schema?: string;
|
||||
|
||||
/**
|
||||
* Modes configuration, see https://opencode.ai/docs/modes
|
||||
*/
|
||||
agent?: Config.Agent;
|
||||
|
||||
/**
|
||||
* @deprecated Use 'share' field instead. Share newly created sessions
|
||||
* automatically
|
||||
@@ -97,6 +102,33 @@ export interface Config {
|
||||
}
|
||||
|
||||
export namespace Config {
|
||||
/**
|
||||
* Modes configuration, see https://opencode.ai/docs/modes
|
||||
*/
|
||||
export interface Agent {
|
||||
general?: Agent.General;
|
||||
|
||||
[k: string]: Agent.AgentConfig | undefined;
|
||||
}
|
||||
|
||||
export namespace Agent {
|
||||
export interface General extends ConfigAPI.ModeConfig {
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface AgentConfig extends ConfigAPI.ModeConfig {
|
||||
description: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface AgentConfig extends ConfigAPI.ModeConfig {
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface AgentConfig extends ConfigAPI.ModeConfig {
|
||||
description: string;
|
||||
}
|
||||
|
||||
export interface Experimental {
|
||||
hook?: Experimental.Hook;
|
||||
}
|
||||
@@ -438,10 +470,14 @@ export interface McpRemoteConfig {
|
||||
}
|
||||
|
||||
export interface ModeConfig {
|
||||
disable?: boolean;
|
||||
|
||||
model?: string;
|
||||
|
||||
prompt?: string;
|
||||
|
||||
temperature?: number;
|
||||
|
||||
tools?: { [key: string]: boolean };
|
||||
}
|
||||
|
||||
|
||||
@@ -17,23 +17,36 @@ export class Event extends APIResource {
|
||||
}
|
||||
|
||||
export type EventListResponse =
|
||||
| EventListResponse.EventLspClientDiagnostics
|
||||
| EventListResponse.EventPermissionUpdated
|
||||
| EventListResponse.EventFileEdited
|
||||
| EventListResponse.EventInstallationUpdated
|
||||
| EventListResponse.EventLspClientDiagnostics
|
||||
| EventListResponse.EventMessageUpdated
|
||||
| EventListResponse.EventMessageRemoved
|
||||
| EventListResponse.EventMessagePartUpdated
|
||||
| EventListResponse.EventMessagePartRemoved
|
||||
| EventListResponse.EventStorageWrite
|
||||
| EventListResponse.EventPermissionUpdated
|
||||
| EventListResponse.EventFileEdited
|
||||
| EventListResponse.EventSessionUpdated
|
||||
| EventListResponse.EventSessionDeleted
|
||||
| EventListResponse.EventSessionIdle
|
||||
| EventListResponse.EventSessionError
|
||||
| EventListResponse.EventServerConnected
|
||||
| EventListResponse.EventFileWatcherUpdated
|
||||
| EventListResponse.EventIdeInstalled;
|
||||
|
||||
export namespace EventListResponse {
|
||||
export interface EventInstallationUpdated {
|
||||
properties: EventInstallationUpdated.Properties;
|
||||
|
||||
type: 'installation.updated';
|
||||
}
|
||||
|
||||
export namespace EventInstallationUpdated {
|
||||
export interface Properties {
|
||||
version: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventLspClientDiagnostics {
|
||||
properties: EventLspClientDiagnostics.Properties;
|
||||
|
||||
@@ -48,56 +61,6 @@ export namespace EventListResponse {
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventPermissionUpdated {
|
||||
properties: EventPermissionUpdated.Properties;
|
||||
|
||||
type: 'permission.updated';
|
||||
}
|
||||
|
||||
export namespace EventPermissionUpdated {
|
||||
export interface Properties {
|
||||
id: string;
|
||||
|
||||
metadata: { [key: string]: unknown };
|
||||
|
||||
sessionID: string;
|
||||
|
||||
time: Properties.Time;
|
||||
|
||||
title: string;
|
||||
}
|
||||
|
||||
export namespace Properties {
|
||||
export interface Time {
|
||||
created: number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventFileEdited {
|
||||
properties: EventFileEdited.Properties;
|
||||
|
||||
type: 'file.edited';
|
||||
}
|
||||
|
||||
export namespace EventFileEdited {
|
||||
export interface Properties {
|
||||
file: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventInstallationUpdated {
|
||||
properties: EventInstallationUpdated.Properties;
|
||||
|
||||
type: 'installation.updated';
|
||||
}
|
||||
|
||||
export namespace EventInstallationUpdated {
|
||||
export interface Properties {
|
||||
version: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventMessageUpdated {
|
||||
properties: EventMessageUpdated.Properties;
|
||||
|
||||
@@ -147,6 +110,8 @@ export namespace EventListResponse {
|
||||
messageID: string;
|
||||
|
||||
partID: string;
|
||||
|
||||
sessionID: string;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -164,6 +129,44 @@ export namespace EventListResponse {
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventPermissionUpdated {
|
||||
properties: EventPermissionUpdated.Properties;
|
||||
|
||||
type: 'permission.updated';
|
||||
}
|
||||
|
||||
export namespace EventPermissionUpdated {
|
||||
export interface Properties {
|
||||
id: string;
|
||||
|
||||
metadata: { [key: string]: unknown };
|
||||
|
||||
sessionID: string;
|
||||
|
||||
time: Properties.Time;
|
||||
|
||||
title: string;
|
||||
}
|
||||
|
||||
export namespace Properties {
|
||||
export interface Time {
|
||||
created: number;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventFileEdited {
|
||||
properties: EventFileEdited.Properties;
|
||||
|
||||
type: 'file.edited';
|
||||
}
|
||||
|
||||
export namespace EventFileEdited {
|
||||
export interface Properties {
|
||||
file: string;
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventSessionUpdated {
|
||||
properties: EventSessionUpdated.Properties;
|
||||
|
||||
@@ -226,6 +229,12 @@ export namespace EventListResponse {
|
||||
}
|
||||
}
|
||||
|
||||
export interface EventServerConnected {
|
||||
properties: unknown;
|
||||
|
||||
type: 'server.connected';
|
||||
}
|
||||
|
||||
export interface EventFileWatcherUpdated {
|
||||
properties: EventFileWatcherUpdated.Properties;
|
||||
|
||||
|
||||
@@ -27,42 +27,6 @@ export class Find extends APIResource {
|
||||
}
|
||||
}
|
||||
|
||||
export interface Match {
|
||||
absolute_offset: number;
|
||||
|
||||
line_number: number;
|
||||
|
||||
lines: Match.Lines;
|
||||
|
||||
path: Match.Path;
|
||||
|
||||
submatches: Array<Match.Submatch>;
|
||||
}
|
||||
|
||||
export namespace Match {
|
||||
export interface Lines {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface Path {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface Submatch {
|
||||
end: number;
|
||||
|
||||
match: Submatch.Match;
|
||||
|
||||
start: number;
|
||||
}
|
||||
|
||||
export namespace Submatch {
|
||||
export interface Match {
|
||||
text: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface Symbol {
|
||||
kind: number;
|
||||
|
||||
@@ -105,7 +69,45 @@ export type FindFilesResponse = Array<string>;
|
||||
|
||||
export type FindSymbolsResponse = Array<Symbol>;
|
||||
|
||||
export type FindTextResponse = Array<Match>;
|
||||
export type FindTextResponse = Array<FindTextResponse.FindTextResponseItem>;
|
||||
|
||||
export namespace FindTextResponse {
|
||||
export interface FindTextResponseItem {
|
||||
absolute_offset: number;
|
||||
|
||||
line_number: number;
|
||||
|
||||
lines: FindTextResponseItem.Lines;
|
||||
|
||||
path: FindTextResponseItem.Path;
|
||||
|
||||
submatches: Array<FindTextResponseItem.Submatch>;
|
||||
}
|
||||
|
||||
export namespace FindTextResponseItem {
|
||||
export interface Lines {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface Path {
|
||||
text: string;
|
||||
}
|
||||
|
||||
export interface Submatch {
|
||||
end: number;
|
||||
|
||||
match: Submatch.Match;
|
||||
|
||||
start: number;
|
||||
}
|
||||
|
||||
export namespace Submatch {
|
||||
export interface Match {
|
||||
text: string;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export interface FindFilesParams {
|
||||
query: string;
|
||||
@@ -121,7 +123,6 @@ export interface FindTextParams {
|
||||
|
||||
export declare namespace Find {
|
||||
export {
|
||||
type Match as Match,
|
||||
type Symbol as Symbol,
|
||||
type FindFilesResponse as FindFilesResponse,
|
||||
type FindSymbolsResponse as FindSymbolsResponse,
|
||||
|
||||
@@ -31,7 +31,6 @@ export {
|
||||
} from './file';
|
||||
export {
|
||||
Find,
|
||||
type Match,
|
||||
type Symbol,
|
||||
type FindFilesResponse,
|
||||
type FindSymbolsResponse,
|
||||
|
||||
@@ -270,6 +270,8 @@ export namespace Session {
|
||||
export interface Revert {
|
||||
messageID: string;
|
||||
|
||||
diff?: string;
|
||||
|
||||
partID?: string;
|
||||
|
||||
snapshot?: string;
|
||||
@@ -541,6 +543,8 @@ export interface SessionChatParams {
|
||||
|
||||
mode?: string;
|
||||
|
||||
system?: string;
|
||||
|
||||
tools?: { [key: string]: boolean };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user