Skip to content

Check render status#7

Merged
danixeee merged 5 commits intomainfrom
get-render-tool
Sep 16, 2025
Merged

Check render status#7
danixeee merged 5 commits intomainfrom
get-render-tool

Conversation

@danixeee
Copy link
Copy Markdown
Contributor

No description provided.

// Handle successful completion
if (render.state === "DONE") {
return {
content: [],
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should remove text content everywhere, because we use the same data as in structuredContent, just stringyfied.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's explicitly said this is needed for backward compatibility on the spec:

image

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know but I didn't notice any difference.. Do you think that depends on lcp clients or what?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure it depends on the client

Comment thread src/constants.ts Outdated
@@ -0,0 +1,3 @@
import env from "./env";

export const PLAINLY_APP_URL = env.PLAINLY_API_URL.replace("api.", "app.");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

come on we could also have this in the .env file or?

.describe("The render ID returned from the `render_item` tool."),
};

const Output = {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be same output as the render item? should be unifed imo?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

idk, more or less it is the same, why you think it should be exactly the same?


// Handle successful completion
if (render.state === "DONE") {
return {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep text, would also add that 👍

  • uri to the video output
  • name can be resolved from filename render stuff
  • mime type known by content type (also available)
  • description: link to a final video output
  • no annotations
{
  "type": "resource_link",
  "uri": "file:///project/src/main.rs",
  "name": "main.rs",
  "description": "Primary application entry point",
  "mimeType": "text/x-rust",
  "annotations": {
    "audience": ["assistant"],
    "priority": 0.9
  }
}

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hardcoded these, but it always point to local file, see here
#3 (comment)

return {
content: [],
structuredContent: {
message: "Render is processing. Please wait and check back later.",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe a time to wait before checking back. If throttled longest, queued & in-progress shorter?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Client always needs a user input to be able to invoke tool, so you need to ask him if the render is finished, that's why I added render page URL so you can navigate and see the details there

Comment thread src/tools/checkRenderStatus.ts Outdated
// Status information
message: z
.string()
.describe("A human-readable message for the render status."),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why is this better, than the state description in the tool?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am even thinking of getting state out of the output, because this message should be sufficient and combine some states in case of "processing"

Comment thread src/tools/renderItem.ts Outdated
const output = {
renderId: render.id,
renderDetailsPageUrl: `https://app.test.plainlyvideos.com/dashboard/renders/${render.id}`,
renderDetailsPageUrl: `${PLAINLY_APP_URL}/dashboard/renders/${render.id}`,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why did not you add this as the resource link also?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same reason as above, resource links are always pointing to local file with download icon.. so I guess it's used for a different usecase. Also, you can ask for render page url and you will get a nice link in the response, so not sure what are benefits of resources

Copy link
Copy Markdown
Contributor

@ivansenic ivansenic left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's fix that content and merge this, is there anything else needed?

Comment thread src/tools/checkRenderStatus.ts Outdated
Co-authored-by: Ivan Senic <senic.ivan@gmail.com>
@danixeee danixeee marked this pull request as ready for review September 16, 2025 09:12
@danixeee danixeee merged commit 4f1ca48 into main Sep 16, 2025
1 check passed
@danixeee danixeee deleted the get-render-tool branch September 16, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants