Skip to content

Commit

Permalink
change app id to assistant
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Veyssier <[email protected]>
  • Loading branch information
julien-nc committed Aug 10, 2023
1 parent 92ed6e7 commit 9e4ff04
Show file tree
Hide file tree
Showing 24 changed files with 76 additions and 76 deletions.
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
name: Bug Report
description: Create a bug report for textprocessing_assistant
description: Create a bug report for assistant
labels: ['bug']
body:
- type: markdown
attributes:
value: Thanks for taking the time to file a bug report! Please fill out this form as completely as possible.
- type: input
attributes:
label: Which version of textprocessing_assistant are you using?
label: Which version of assistant are you using?
description: 'Please specify the exact version instead of "latest". For example: 2.0.2'
validations:
required: true
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Feature Request
description: Create a feature request for textprocessing_assistant
description: Create a feature request for assistant
labels: ['enhancement']
body:
- type: markdown
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ on:
- tests/**

env:
APP_NAME: textprocessing_assistant
APP_NAME: assistant

jobs:
php:
Expand Down
6 changes: 3 additions & 3 deletions .tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
host = https://www.transifex.com
lang_map = hu_HU: hu, nb_NO: nb, sk_SK: sk, th_TH: th, ja_JP: ja, bg_BG: bg, cs_CZ: cs, fi_FI: fi

[o:nextcloud:p:nextcloud:r:textprocessing_assistant]
file_filter = translationfiles/<lang>/textprocessing_assistant.po
source_file = translationfiles/templates/textprocessing_assistant.pot
[o:nextcloud:p:nextcloud:r:assistant]
file_filter = translationfiles/<lang>/assistant.po
source_file = translationfiles/templates/assistant.pot
source_lang = en
type = PO

14 changes: 7 additions & 7 deletions appinfo/info.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0"?>
<info>
<id>textprocessing_assistant</id>
<id>assistant</id>
<name>Nextcloud assistant</name>
<summary>Process and transform text</summary>
<description><![CDATA[
Expand Down Expand Up @@ -39,14 +39,14 @@ include text processing providers to:
<author>Julien Veyssier</author>
<namespace>TPAssistant</namespace>
<documentation>
<developer>https://github.com/julien-nc/textprocessing_assistant</developer>
<developer>https://github.com/julien-nc/assistant</developer>
</documentation>
<category>integration</category>
<website>https://github.com/julien-nc/textprocessing_assistant</website>
<bugs>https://github.com/julien-nc/textprocessing_assistant/issues</bugs>
<screenshot>https://github.com/julien-nc/textprocessing_assistant/raw/main/img/screenshot1.jpg</screenshot>
<screenshot>https://github.com/julien-nc/textprocessing_assistant/raw/main/img/screenshot2.jpg</screenshot>
<screenshot>https://github.com/julien-nc/textprocessing_assistant/raw/main/img/screenshot3.jpg</screenshot>
<website>https://github.com/julien-nc/assistant</website>
<bugs>https://github.com/julien-nc/assistant/issues</bugs>
<screenshot>https://github.com/julien-nc/assistant/raw/main/img/screenshot1.jpg</screenshot>
<screenshot>https://github.com/julien-nc/assistant/raw/main/img/screenshot2.jpg</screenshot>
<screenshot>https://github.com/julien-nc/assistant/raw/main/img/screenshot3.jpg</screenshot>
<dependencies>
<nextcloud min-version="27.1.0" max-version="28"/>
</dependencies>
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "nextcloud/textprocessing_assistant",
"name": "nextcloud/assistant",
"authors": [
{
"name": "Julien Veyssier",
Expand Down
2 changes: 1 addition & 1 deletion lib/AppInfo/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

class Application extends App implements IBootstrap {

public const APP_ID = 'textprocessing_assistant';
public const APP_ID = 'assistant';

private IConfig $config;

Expand Down
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
app_name=textprocessing_assistant
app_name=assistant
app_version=$(version)
project_dir=.
build_dir=/tmp/build
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "textprocessing_assistant",
"name": "assistant",
"version": "0.0.1",
"description": "Nextcloud assistant",
"main": "index.js",
Expand All @@ -17,7 +17,7 @@
},
"repository": {
"type": "git",
"url": "https://github.com/julien-nc/textprocessing_assistant"
"url": "https://github.com/julien-nc/assistant"
},
"keywords": [
"artificial intelligence",
Expand All @@ -26,9 +26,9 @@
"author": "Julien Veyssier",
"license": "AGPL-3.0",
"bugs": {
"url": "https://github.com/julien-nc/textprocessing_assistant/issues"
"url": "https://github.com/julien-nc/assistant/issues"
},
"homepage": "https://github.com/julien-nc/textprocessing_assistant",
"homepage": "https://github.com/julien-nc/assistant",
"browserslist": [
"extends @nextcloud/browserslist-config"
],
Expand Down
2 changes: 1 addition & 1 deletion src/adminSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ import AdminSettings from './components/AdminSettings.vue'
Vue.mixin({ methods: { t, n } })

const View = Vue.extend(AdminSettings)
new View().$mount('#textprocessing_assistant_prefs')
new View().$mount('#assistant_prefs')
14 changes: 7 additions & 7 deletions src/assistant.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { linkTo } from '@nextcloud/router'
import { getRequestToken } from '@nextcloud/auth'
__webpack_nonce__ = btoa(getRequestToken()) // eslint-disable-line
__webpack_public_path__ = linkTo('textprocessing_assistant', 'js/') // eslint-disable-line
__webpack_public_path__ = linkTo('assistant', 'js/') // eslint-disable-line

/**
* Creates an assistant modal and return a promise which provides the result
Expand Down Expand Up @@ -97,7 +97,7 @@ async function saveLastSelectedTaskType(taskType) {
last_task_type: taskType,
},
}
const url = generateUrl('/apps/textprocessing_assistant/config')
const url = generateUrl('/apps/assistant/config')
return axios.put(url, req)
}

Expand All @@ -110,7 +110,7 @@ async function getLastSelectedTaskType() {
key: 'last_task_type',
},
}
const url = generateUrl('/apps/textprocessing_assistant/config')
const url = generateUrl('/apps/assistant/config')
return axios.get(url, req)
}

Expand All @@ -120,7 +120,7 @@ async function getLastSelectedTaskType() {
* @param {event} event the notification event
*/
export function handleNotification(event) {
if (event.notification.app !== 'textprocessing_assistant' || event.action.type !== 'WEB') {
if (event.notification.app !== 'assistant' || event.action.type !== 'WEB') {
return
}
// Handle the action click only if the task was scheduled by the assistant
Expand Down Expand Up @@ -148,7 +148,7 @@ async function showResults(taskId) {
openAssistantResult(response.data.ocs.data.task)
}).catch(error => {
console.error(error)
showError(t('textprocessing_assistant', 'This task does not exist or has been cleaned up'))
showError(t('assistant', 'This task does not exist or has been cleaned up'))
})
}

Expand Down Expand Up @@ -192,7 +192,7 @@ export async function openAssistantResult(task) {
.catch(error => {
view.$destroy()
console.error('Assistant scheduling error', error)
showError(t('textprocessing_assistant', 'Failed to schedule the task'))
showError(t('assistant', 'Failed to schedule the task'))
})
})
}
Expand All @@ -213,7 +213,7 @@ export async function addAssistantMenuEntry() {
}).$mount(menuEntry)

view.$on('click', () => {
openAssistantForm({ appId: 'textprocessing_assistant' })
openAssistantForm({ appId: 'assistant' })
.then(r => {
console.debug('scheduled task', r)
})
Expand Down
18 changes: 9 additions & 9 deletions src/components/AdminSettings.vue
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
<template>
<div id="textprocessing_assistant_prefs" class="section">
<div id="assistant_prefs" class="section">
<h2>
<AssistantIcon class="icon" />
{{ t('textprocessing_assistant', 'Nextcloud assistant') }}
{{ t('assistant', 'Nextcloud assistant') }}
</h2>
<div id="assistant-content">
<div>
<h3>
{{ t('textprocessing_assistant', 'Select which features you want to enable') }}
{{ t('assistant', 'Select which features you want to enable') }}
</h3>
<NcCheckboxRadioSwitch
:checked="state.assistant_enabled"
@update:checked="onCheckboxChanged($event, 'assistant_enabled')">
{{ t('textprocessing_assistant', 'Top-right assistant') }}
{{ t('assistant', 'Top-right assistant') }}
</NcCheckboxRadioSwitch>
</div>
</div>
Expand Down Expand Up @@ -41,7 +41,7 @@ export default {
data() {
return {
state: loadState('textprocessing_assistant', 'admin-config'),
state: loadState('assistant', 'admin-config'),
}
},
Expand All @@ -63,14 +63,14 @@ export default {
const req = {
values,
}
const url = generateUrl('/apps/textprocessing_assistant/admin-config')
const url = generateUrl('/apps/assistant/admin-config')
return axios.put(url, req)
.then((response) => {
showSuccess(t('textprocessing_assistant', 'Assistant admin options saved'))
showSuccess(t('assistant', 'Assistant admin options saved'))
})
.catch((error) => {
showError(
t('textprocessing_assistant', 'Failed to save assistant admin options')
t('assistant', 'Failed to save assistant admin options')
+ ': ' + error.response?.request?.responseText
)
})
Expand All @@ -80,7 +80,7 @@ export default {
</script>
<style scoped lang="scss">
#textprocessing_assistant_prefs {
#assistant_prefs {
#assistant-content {
margin-left: 40px;
}
Expand Down
22 changes: 11 additions & 11 deletions src/components/AssistantForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<div class="assistant-form">
<span class="assistant-bubble">
<CreationIcon :size="16" class="icon" />
<span>{{ t('textprocessing_assistant', 'Nextcloud assistant') }}</span>
<span>{{ t('assistant', 'Nextcloud assistant') }}</span>
</span>
<NcSelect
:value="selectedTaskType"
class="task-select"
:options="taskTypes"
label="name"
:placeholder="t('textprocessing_assistant', 'Choose a task')"
:placeholder="t('assistant', 'Choose a task')"
input-id="task-select"
@input="onTaskInput" />
<h2 v-if="selectedTaskType"
Expand All @@ -25,7 +25,7 @@
class="editable-input"
:multiline="true"
:disabled="loading"
:placeholder="t('textprocessing_assistant', 'Type some text')"
:placeholder="t('assistant', 'Type some text')"
:link-autocomplete="false" />
<NcRichContenteditable
v-if="myOutput"
Expand All @@ -34,16 +34,16 @@
class="editable-output"
:multiline="true"
:disabled="loading"
:placeholder="t('textprocessing_assistant', 'Result')"
:placeholder="t('assistant', 'Result')"
:link-autocomplete="false" />
<div class="footer">
<NcButton
v-if="showSubmit"
:type="submitButtonType"
class="submit-button"
:disabled="!canSubmit"
:aria-label="t('textprocessing_assistant', 'Submit assistant task')"
:title="t('textprocessing_assistant', 'Submit')"
:aria-label="t('assistant', 'Submit assistant task')"
:title="t('assistant', 'Submit')"
@click="onSubmit">
{{ submitButtonLabel }}
<template #icon>
Expand All @@ -54,10 +54,10 @@
v-if="showCopy"
type="primary"
class="copy-button"
:aria-label="t('textprocessing_assistant', 'Copy task output')"
:title="t('textprocessing_assistant', 'Copy')"
:aria-label="t('assistant', 'Copy task output')"
:title="t('assistant', 'Copy')"
@click="onCopy">
{{ t('textprocessing_assistant', 'Copy') }}
{{ t('assistant', 'Copy') }}
<template #icon>
<ClipboardCheckOutlineIcon v-if="copied" />
<ContentCopyIcon v-else />
Expand Down Expand Up @@ -139,7 +139,7 @@ export default {
return this.selectedTaskType && !!this.myInput.trim()
},
submitButtonLabel() {
return this.myOutput.trim() ? t('textprocessing_assistant', 'Try again') : this.selectedTaskType.name
return this.myOutput.trim() ? t('assistant', 'Try again') : this.selectedTaskType.name
},
showCopy() {
return !!this.myOutput.trim()
Expand Down Expand Up @@ -180,7 +180,7 @@ export default {
}, 5000)
} catch (error) {
console.error(error)
showError(t('textprocessing_assistant', 'Result could not be copied to clipboard'))
showError(t('assistant', 'Result could not be copied to clipboard'))
}
},
},
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssistantHeaderMenuEntry.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div id="assistant"
class="header-menu"
:title="t('textprocessing_assistant', 'Nextcloud assistant')">
:title="t('assistant', 'Nextcloud assistant')">
<a
href="#"
@click="$emit('click')">
Expand Down
10 changes: 5 additions & 5 deletions src/components/AssistantModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,16 @@
</NcButton>
<NcEmptyContent
v-if="showScheduleConfirmation"
:title="t('textprocessing_assistant', 'Your task has been scheduled, you will receive a notification when it has finished')"
:name="t('textprocessing_assistant', 'Your task has been scheduled, you will receive a notification when it has finished')"
:title="t('assistant', 'Your task has been scheduled, you will receive a notification when it has finished')"
:name="t('assistant', 'Your task has been scheduled, you will receive a notification when it has finished')"
:description="shortInput">
<template #action>
<NcButton
@click="onCancel">
<template #icon>
<CloseIcon />
</template>
{{ t('textprocessing_assistant', 'Close') }}
{{ t('assistant', 'Close') }}
</NcButton>
</template>
<template #icon>
Expand Down Expand Up @@ -102,8 +102,8 @@ export default {
data() {
return {
show: true,
closeButtonTitle: t('textprocessing_assistant', 'Close'),
closeButtonLabel: t('textprocessing_assistant', 'Close Nextcloud assistant'),
closeButtonTitle: t('assistant', 'Close'),
closeButtonLabel: t('assistant', 'Close Nextcloud assistant'),
modalSize: 'normal',
}
},
Expand Down
Loading

0 comments on commit 9e4ff04

Please sign in to comment.