File tree Expand file tree Collapse file tree
opencode/migration/20260303231226_add_workspace_fields Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22 "version" : " 7" ,
33 "dialect" : " sqlite" ,
44 "id" : " 4ec9de62-88a7-4bec-91cc-0a759e84db21" ,
5- "prevIds" : [
6- " 572fb732-56f4-4b1e-b981-77152c9980dd"
7- ],
5+ "prevIds" : [" 572fb732-56f4-4b1e-b981-77152c9980dd" ],
86 "ddl" : [
97 {
108 "name" : " workspace" ,
773771 "table" : " session_share"
774772 },
775773 {
776- "columns" : [
777- " project_id"
778- ],
774+ "columns" : [" project_id" ],
779775 "tableTo" : " project" ,
780- "columnsTo" : [
781- " id"
782- ],
776+ "columnsTo" : [" id" ],
783777 "onUpdate" : " NO ACTION" ,
784778 "onDelete" : " CASCADE" ,
785779 "nameExplicit" : false ,
788782 "table" : " workspace"
789783 },
790784 {
791- "columns" : [
792- " session_id"
793- ],
785+ "columns" : [" session_id" ],
794786 "tableTo" : " session" ,
795- "columnsTo" : [
796- " id"
797- ],
787+ "columnsTo" : [" id" ],
798788 "onUpdate" : " NO ACTION" ,
799789 "onDelete" : " CASCADE" ,
800790 "nameExplicit" : false ,
803793 "table" : " message"
804794 },
805795 {
806- "columns" : [
807- " message_id"
808- ],
796+ "columns" : [" message_id" ],
809797 "tableTo" : " message" ,
810- "columnsTo" : [
811- " id"
812- ],
798+ "columnsTo" : [" id" ],
813799 "onUpdate" : " NO ACTION" ,
814800 "onDelete" : " CASCADE" ,
815801 "nameExplicit" : false ,
818804 "table" : " part"
819805 },
820806 {
821- "columns" : [
822- " project_id"
823- ],
807+ "columns" : [" project_id" ],
824808 "tableTo" : " project" ,
825- "columnsTo" : [
826- " id"
827- ],
809+ "columnsTo" : [" id" ],
828810 "onUpdate" : " NO ACTION" ,
829811 "onDelete" : " CASCADE" ,
830812 "nameExplicit" : false ,
833815 "table" : " permission"
834816 },
835817 {
836- "columns" : [
837- " project_id"
838- ],
818+ "columns" : [" project_id" ],
839819 "tableTo" : " project" ,
840- "columnsTo" : [
841- " id"
842- ],
820+ "columnsTo" : [" id" ],
843821 "onUpdate" : " NO ACTION" ,
844822 "onDelete" : " CASCADE" ,
845823 "nameExplicit" : false ,
848826 "table" : " session"
849827 },
850828 {
851- "columns" : [
852- " session_id"
853- ],
829+ "columns" : [" session_id" ],
854830 "tableTo" : " session" ,
855- "columnsTo" : [
856- " id"
857- ],
831+ "columnsTo" : [" id" ],
858832 "onUpdate" : " NO ACTION" ,
859833 "onDelete" : " CASCADE" ,
860834 "nameExplicit" : false ,
863837 "table" : " todo"
864838 },
865839 {
866- "columns" : [
867- " session_id"
868- ],
840+ "columns" : [" session_id" ],
869841 "tableTo" : " session" ,
870- "columnsTo" : [
871- " id"
872- ],
842+ "columnsTo" : [" id" ],
873843 "onUpdate" : " NO ACTION" ,
874844 "onDelete" : " CASCADE" ,
875845 "nameExplicit" : false ,
878848 "table" : " session_share"
879849 },
880850 {
881- "columns" : [
882- " email" ,
883- " url"
884- ],
851+ "columns" : [" email" , " url" ],
885852 "nameExplicit" : false ,
886853 "name" : " control_account_pk" ,
887854 "entityType" : " pks" ,
888855 "table" : " control_account"
889856 },
890857 {
891- "columns" : [
892- " session_id" ,
893- " position"
894- ],
858+ "columns" : [" session_id" , " position" ],
895859 "nameExplicit" : false ,
896860 "name" : " todo_pk" ,
897861 "entityType" : " pks" ,
898862 "table" : " todo"
899863 },
900864 {
901- "columns" : [
902- " id"
903- ],
865+ "columns" : [" id" ],
904866 "nameExplicit" : false ,
905867 "name" : " workspace_pk" ,
906868 "table" : " workspace" ,
907869 "entityType" : " pks"
908870 },
909871 {
910- "columns" : [
911- " id"
912- ],
872+ "columns" : [" id" ],
913873 "nameExplicit" : false ,
914874 "name" : " project_pk" ,
915875 "table" : " project" ,
916876 "entityType" : " pks"
917877 },
918878 {
919- "columns" : [
920- " id"
921- ],
879+ "columns" : [" id" ],
922880 "nameExplicit" : false ,
923881 "name" : " message_pk" ,
924882 "table" : " message" ,
925883 "entityType" : " pks"
926884 },
927885 {
928- "columns" : [
929- " id"
930- ],
886+ "columns" : [" id" ],
931887 "nameExplicit" : false ,
932888 "name" : " part_pk" ,
933889 "table" : " part" ,
934890 "entityType" : " pks"
935891 },
936892 {
937- "columns" : [
938- " project_id"
939- ],
893+ "columns" : [" project_id" ],
940894 "nameExplicit" : false ,
941895 "name" : " permission_pk" ,
942896 "table" : " permission" ,
943897 "entityType" : " pks"
944898 },
945899 {
946- "columns" : [
947- " id"
948- ],
900+ "columns" : [" id" ],
949901 "nameExplicit" : false ,
950902 "name" : " session_pk" ,
951903 "table" : " session" ,
952904 "entityType" : " pks"
953905 },
954906 {
955- "columns" : [
956- " session_id"
957- ],
907+ "columns" : [" session_id" ],
958908 "nameExplicit" : false ,
959909 "name" : " session_share_pk" ,
960910 "table" : " session_share" ,
10601010 }
10611011 ],
10621012 "renames" : []
1063- }
1013+ }
Original file line number Diff line number Diff line change @@ -902,12 +902,10 @@ export class Workspace extends HeyApiClient {
902902 parameters ?: {
903903 directory ?: string
904904 workspace ?: string
905- body ?: {
906- branch ?: string | null
907- } & {
908- type : "worktree"
909- name : string
910- }
905+ id ?: string
906+ type ?: string
907+ branch ?: string | null
908+ extra ?: unknown | null
911909 } ,
912910 options ?: Options < never , ThrowOnError > ,
913911 ) {
@@ -918,7 +916,10 @@ export class Workspace extends HeyApiClient {
918916 args : [
919917 { in : "query" , key : "directory" } ,
920918 { in : "query" , key : "workspace" } ,
921- { key : "body" , map : "body" } ,
919+ { in : "body" , key : "id" } ,
920+ { in : "body" , key : "type" } ,
921+ { in : "body" , key : "branch" } ,
922+ { in : "body" , key : "extra" } ,
922923 ] ,
923924 } ,
924925 ] ,
Original file line number Diff line number Diff line change @@ -889,21 +889,6 @@ export type EventVcsBranchUpdated = {
889889 }
890890}
891891
892- export type EventWorktreeReady = {
893- type : "worktree.ready"
894- properties : {
895- name : string
896- branch : string
897- }
898- }
899-
900- export type EventWorktreeFailed = {
901- type : "worktree.failed"
902- properties : {
903- message : string
904- }
905- }
906-
907892export type EventWorkspaceReady = {
908893 type : "workspace.ready"
909894 properties : {
@@ -957,6 +942,21 @@ export type EventPtyDeleted = {
957942 }
958943}
959944
945+ export type EventWorktreeReady = {
946+ type : "worktree.ready"
947+ properties : {
948+ name : string
949+ branch : string
950+ }
951+ }
952+
953+ export type EventWorktreeFailed = {
954+ type : "worktree.failed"
955+ properties : {
956+ message : string
957+ }
958+ }
959+
960960export type Event =
961961 | EventInstallationUpdated
962962 | EventInstallationUpdateAvailable
@@ -995,14 +995,14 @@ export type Event =
995995 | EventSessionDiff
996996 | EventSessionError
997997 | EventVcsBranchUpdated
998- | EventWorktreeReady
999- | EventWorktreeFailed
1000998 | EventWorkspaceReady
1001999 | EventWorkspaceFailed
10021000 | EventPtyCreated
10031001 | EventPtyUpdated
10041002 | EventPtyExited
10051003 | EventPtyDeleted
1004+ | EventWorktreeReady
1005+ | EventWorktreeFailed
10061006
10071007export type GlobalEvent = {
10081008 directory : string
@@ -1633,14 +1633,12 @@ export type ToolList = Array<ToolListItem>
16331633
16341634export type Workspace = {
16351635 id : string
1636+ type : string
16361637 branch : string | null
1638+ name : string | null
1639+ directory : string | null
1640+ extra : unknown | null
16371641 projectID : string
1638- config : {
1639- type : "worktree"
1640- directory : string
1641- name : string
1642- branch : string
1643- }
16441642}
16451643
16461644export type Worktree = {
@@ -2468,10 +2466,10 @@ export type ExperimentalWorkspaceListResponse =
24682466
24692467export type ExperimentalWorkspaceCreateData = {
24702468 body ?: {
2471- branch ?: string | null
2472- } & {
2473- type : "worktree"
2474- name : string
2469+ id ?: string
2470+ type : string
2471+ branch : string | null
2472+ extra : unknown | null
24752473 }
24762474 path ?: never
24772475 query ?: {
You can’t perform that action at this time.
0 commit comments