Add artifact routing diagnostics
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -789,6 +789,13 @@ impl TelegramGateway {
|
||||
}
|
||||
}
|
||||
let miniapp_base = miniapp_base_url.as_deref();
|
||||
if !generated_files.is_empty() {
|
||||
eprintln!(
|
||||
"artifact routing: {} files, miniapp_base={:?}",
|
||||
generated_files.len(),
|
||||
miniapp_base,
|
||||
);
|
||||
}
|
||||
for descriptor in generated_files {
|
||||
if descriptor.size_bytes > max_upload_bytes
|
||||
&& !(miniapp_base.is_some() && is_previewable(&descriptor))
|
||||
@@ -823,6 +830,12 @@ impl TelegramGateway {
|
||||
continue;
|
||||
}
|
||||
};
|
||||
eprintln!(
|
||||
"artifact: name={} previewable={} miniapp={}",
|
||||
descriptor.file_name,
|
||||
is_previewable(&descriptor),
|
||||
miniapp_base.is_some(),
|
||||
);
|
||||
if let Some(base_url) = miniapp_base {
|
||||
if is_previewable(&descriptor) {
|
||||
register_artifact(
|
||||
|
||||
@@ -314,6 +314,7 @@ pub async fn serve(config: GatewayConfig, bind_addr: String) -> Result<(), MiniA
|
||||
.with_state(Arc::new(state));
|
||||
|
||||
let listener = TcpListener::bind(&bind_addr).await?;
|
||||
eprintln!("miniapp server listening on {bind_addr}");
|
||||
axum::serve(listener, app)
|
||||
.await
|
||||
.map_err(MiniAppError::Io)
|
||||
|
||||
Reference in New Issue
Block a user