mirror of
https://github.com/openai/codex.git
synced 2026-09-14 11:57:03 +00:00
debug linux plugin mention resolution
Co-authored-by: Codex <noreply@openai.com>
This commit is contained in:
@@ -4944,6 +4944,25 @@ pub(crate) async fn run_turn(
|
||||
// enabled plugins, then converted into turn-scoped guidance below.
|
||||
let mentioned_plugins =
|
||||
collect_explicit_plugin_mentions(&input, loaded_plugins.capability_summaries());
|
||||
info!(
|
||||
plugin_input_texts = ?input
|
||||
.iter()
|
||||
.filter_map(|item| match item {
|
||||
UserInput::Text { text, .. } => Some(text.as_str()),
|
||||
_ => None,
|
||||
})
|
||||
.collect::<Vec<_>>(),
|
||||
available_plugins = ?loaded_plugins
|
||||
.capability_summaries()
|
||||
.iter()
|
||||
.map(|plugin| plugin.display_name.as_str())
|
||||
.collect::<Vec<_>>(),
|
||||
mentioned_plugins = ?mentioned_plugins
|
||||
.iter()
|
||||
.map(|plugin| plugin.display_name.as_str())
|
||||
.collect::<Vec<_>>(),
|
||||
"resolved explicit plugin mentions for turn"
|
||||
);
|
||||
let mcp_tools =
|
||||
if turn_context.config.features.enabled(Feature::Apps) || !mentioned_plugins.is_empty() {
|
||||
// Plugin mentions need raw MCP/app inventory even when app tools
|
||||
|
||||
@@ -30,6 +30,7 @@ use std::fs;
|
||||
use std::path::Path;
|
||||
use std::path::PathBuf;
|
||||
use std::sync::RwLock;
|
||||
use tracing::info;
|
||||
use tracing::warn;
|
||||
|
||||
const DEFAULT_SKILLS_DIR_NAME: &str = "skills";
|
||||
@@ -258,6 +259,7 @@ impl PluginsManager {
|
||||
force_reload: bool,
|
||||
) -> PluginLoadOutcome {
|
||||
if !plugins_feature_enabled_from_stack(config_layer_stack) {
|
||||
info!(cwd = ?cwd, "plugins disabled in config layer stack");
|
||||
let mut cache = match self.cache_by_cwd.write() {
|
||||
Ok(cache) => cache,
|
||||
Err(err) => err.into_inner(),
|
||||
@@ -267,11 +269,29 @@ impl PluginsManager {
|
||||
}
|
||||
|
||||
if !force_reload && let Some(outcome) = self.cached_outcome_for_cwd(cwd) {
|
||||
info!(
|
||||
cwd = ?cwd,
|
||||
plugin_display_names = ?outcome
|
||||
.capability_summaries()
|
||||
.iter()
|
||||
.map(|plugin| plugin.display_name.as_str())
|
||||
.collect::<Vec<_>>(),
|
||||
"plugins cache hit"
|
||||
);
|
||||
return outcome;
|
||||
}
|
||||
|
||||
let outcome = load_plugins_from_layer_stack(config_layer_stack, &self.store);
|
||||
log_plugin_load_errors(&outcome);
|
||||
info!(
|
||||
cwd = ?cwd,
|
||||
plugin_display_names = ?outcome
|
||||
.capability_summaries()
|
||||
.iter()
|
||||
.map(|plugin| plugin.display_name.as_str())
|
||||
.collect::<Vec<_>>(),
|
||||
"plugins loaded from config layer stack"
|
||||
);
|
||||
let mut cache = match self.cache_by_cwd.write() {
|
||||
Ok(cache) => cache,
|
||||
Err(err) => err.into_inner(),
|
||||
|
||||
Reference in New Issue
Block a user