Add session permission updates
Some checks failed
Test / test (3.3) (push) Failing after 9m59s
Test / test (3.4) (push) Failing after 10m0s
Test / test (3.2) (push) Failing after 10m3s
Some checks failed
Test / test (3.3) (push) Failing after 9m59s
Test / test (3.4) (push) Failing after 10m0s
Test / test (3.2) (push) Failing after 10m3s
This commit is contained in:
@@ -144,6 +144,10 @@ module Opencode
|
||||
execute(request)
|
||||
end
|
||||
|
||||
def update_session(session_id, permissions:)
|
||||
patch("/session/#{session_id}", { permission: permissions })
|
||||
end
|
||||
|
||||
def children(session_id)
|
||||
uri = build_uri("/session/#{session_id}/children")
|
||||
request = Net::HTTP::Get.new(uri)
|
||||
@@ -434,6 +438,13 @@ module Opencode
|
||||
execute(request)
|
||||
end
|
||||
|
||||
def patch(path, body)
|
||||
uri = build_uri(path)
|
||||
request = Net::HTTP::Patch.new(uri)
|
||||
request.body = body.to_json
|
||||
execute(request)
|
||||
end
|
||||
|
||||
def build_uri(path, scoped: true)
|
||||
uri = @uri.dup
|
||||
uri.path = path
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
module Opencode
|
||||
VERSION = "0.0.1.alpha2"
|
||||
VERSION = "0.0.1.alpha3"
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user