Skip to content

draft: use rust messages in typescript#1393

Merged
alexhancock merged 3 commits intomainfrom
baxen/interface-messages
Feb 27, 2025
Merged

draft: use rust messages in typescript#1393
alexhancock merged 3 commits intomainfrom
baxen/interface-messages

Conversation

@baxen
Copy link
Copy Markdown
Collaborator

@baxen baxen commented Feb 26, 2025

No description provided.

@baxen
Copy link
Copy Markdown
Collaborator Author

baxen commented Feb 26, 2025

This is AI generated and needs some cleanup but is a start

messages: Vec<Message>,
}

#[derive(Debug, Deserialize)]
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Great to see this diff with lots of red on the rust side!

const updatedMessages = await processMessageStream(response, requestMessages);

// Auto-submit when all tool calls in the last assistant message have results
if (maxSteps > 1 && updatedMessages.length > requestMessages.length) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

What is this part doing? Hard to grok

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is incorrect I think, i will revisit

onClick={async () => {
const message = {
content: longForm || content,
role: 'user',
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

It doesn't look to me like the new append implementation does anything to explicitly set that the message being appended is from the user https://github.com/block/goose/pull/1393/files#diff-b68456893042db8d6d236bc76aef8598d4ccabb69fb65a08158f2381d25492a2R336

Is there something I am missing that makes this work?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yes later we define append as text => createUserMessage(text)

className="whitespace-pre-wrap p-2 max-w-full overflow-x-auto"
/>
)}
{item.type === 'image' && item.data && item.mimeType && (
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this mean we drop images that could show up in ToolResults?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

yeah accidental here will restore this path

* Generate a random ID string
* @returns A random string ID
*/
export function generateId(): string {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks duplicated from the implementation in types/message.ts - perhaps remove this file?

Copy link
Copy Markdown
Collaborator

@alexhancock alexhancock left a comment

Choose a reason for hiding this comment

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

We should also remove src/ai-sdk-fork/ which we can now!

@alexhancock alexhancock merged commit 0602b35 into main Feb 27, 2025
6 checks passed
@alexhancock alexhancock deleted the baxen/interface-messages branch February 27, 2025 03:02
salman1993 added a commit that referenced this pull request Feb 27, 2025
* origin/main: (26 commits)
  feat: Read .gooseignore to Restrict access to files or Directories (#1199)
  docs: adding update command to cli command guide (#1411)
  docs: Adding YT short for Computer Controller Tutorial (#1420)
  feat(cli): support arbitrary path for sessions (#1414)
  feat: remove the disable state from chat input box (#1341)
  feat: Add extra details to prompt for gui (#1387)
  style: added launch text and styling (#1406)
  fix(docs): update default session location (#1412)
  feat: moved extension add button and updated label (#1408)
  draft: use rust messages in typescript (#1393)
  fix: detect read only tool when only mode is approve (#1398)
  docs: Add Puppeteer Extension Tutorial (#1396)
  chore(release): release version v1.0.10 (#1404)
  chore(release): release 1.10.0  (#1385)
  feat: wip on ConfigProvider and integration in settings_v2 (#1395)
  feat: Add command `goose update` to update goose CLI version (#1308)
  fix: update approve prompt (#1383)
  feat: interactive after run (#1377)
  docs: Tutorial extension (#1379)
  feat: allow setting openai base path (#1369)
  ...
kalvinnchau added a commit that referenced this pull request Feb 27, 2025
* main:
  feat: allow user to turn off smart approve (#1407)
  feat: Read .gooseignore to Restrict access to files or Directories (#1199)
  docs: adding update command to cli command guide (#1411)
  docs: Adding YT short for Computer Controller Tutorial (#1420)
  feat(cli): support arbitrary path for sessions (#1414)
  feat: remove the disable state from chat input box (#1341)
  feat: Add extra details to prompt for gui (#1387)
  style: added launch text and styling (#1406)
  fix(docs): update default session location (#1412)
  feat: moved extension add button and updated label (#1408)
  draft: use rust messages in typescript (#1393)
  fix: detect read only tool when only mode is approve (#1398)
  docs: Add Puppeteer Extension Tutorial (#1396)
  chore(release): release version v1.0.10 (#1404)
  chore(release): release 1.10.0  (#1385)
  feat: wip on ConfigProvider and integration in settings_v2 (#1395)
  feat: Add command `goose update` to update goose CLI version (#1308)
ahau-square pushed a commit that referenced this pull request May 2, 2025
cbruyndoncx pushed a commit to cbruyndoncx/goose that referenced this pull request Jul 20, 2025
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