mirror of
https://github.com/openai/codex.git
synced 2026-11-21 22:50:37 +00:00
feat(tui): show workspace roots in cwd command
This commit is contained in:
@@ -552,6 +552,12 @@ client_request_definitions! {
|
||||
serialization: thread_id(params.thread_id),
|
||||
response: v2::ThreadWorkspaceUpdateResponse,
|
||||
},
|
||||
#[experimental("thread/workspace/read")]
|
||||
ThreadWorkspaceRead => "thread/workspace/read" {
|
||||
params: v2::ThreadWorkspaceReadParams,
|
||||
serialization: thread_id(params.thread_id),
|
||||
response: v2::ThreadWorkspaceReadResponse,
|
||||
},
|
||||
#[experimental("thread/memoryMode/set")]
|
||||
ThreadMemoryModeSet => "thread/memoryMode/set" {
|
||||
params: v2::ThreadMemoryModeSetParams,
|
||||
|
||||
@@ -3736,6 +3736,21 @@ fn thread_workspace_update_params_round_trip() {
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thread_workspace_read_params_round_trip() {
|
||||
let params = ThreadWorkspaceReadParams {
|
||||
thread_id: "thread_123".to_string(),
|
||||
};
|
||||
|
||||
let serialized = serde_json::to_value(¶ms).expect("params should serialize");
|
||||
assert_eq!(serialized, json!({ "threadId": "thread_123" }));
|
||||
assert_eq!(
|
||||
serde_json::from_value::<ThreadWorkspaceReadParams>(serialized)
|
||||
.expect("params should deserialize"),
|
||||
params
|
||||
);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn thread_settings_update_params_preserve_field_level_experimental_gates() {
|
||||
let permissions = ThreadSettingsUpdateParams {
|
||||
|
||||
@@ -300,6 +300,21 @@ pub struct ThreadWorkspaceUpdateResponse {
|
||||
pub runtime_workspace_roots: Vec<AbsolutePathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadWorkspaceReadParams {
|
||||
pub thread_id: String,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
pub struct ThreadWorkspaceReadResponse {
|
||||
pub cwd: AbsolutePathBuf,
|
||||
pub runtime_workspace_roots: Vec<AbsolutePathBuf>,
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, JsonSchema, TS, ExperimentalApi)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[ts(export_to = "v2/")]
|
||||
|
||||
Reference in New Issue
Block a user