mirror of
https://github.com/openai/codex.git
synced 2026-04-30 03:12:20 +03:00
[feedback] Add source info into feedback metadata. (#7140)
Verified the source info is correctly attached based on whether it's cli or vscode.
This commit is contained in:
@@ -1131,6 +1131,29 @@ pub enum SubAgentSource {
|
||||
Other(String),
|
||||
}
|
||||
|
||||
impl fmt::Display for SessionSource {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
SessionSource::Cli => f.write_str("cli"),
|
||||
SessionSource::VSCode => f.write_str("vscode"),
|
||||
SessionSource::Exec => f.write_str("exec"),
|
||||
SessionSource::Mcp => f.write_str("mcp"),
|
||||
SessionSource::SubAgent(sub_source) => write!(f, "subagent_{sub_source}"),
|
||||
SessionSource::Unknown => f.write_str("unknown"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl fmt::Display for SubAgentSource {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
match self {
|
||||
SubAgentSource::Review => f.write_str("review"),
|
||||
SubAgentSource::Compact => f.write_str("compact"),
|
||||
SubAgentSource::Other(other) => f.write_str(other),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Serialize, Deserialize, Clone, Debug, JsonSchema, TS)]
|
||||
pub struct SessionMeta {
|
||||
pub id: ConversationId,
|
||||
|
||||
Reference in New Issue
Block a user